summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-24 01:13:26 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-24 01:13:26 +0300
commit1498a699f89f7b5aebdc4629c645c3702ee04f92 (patch)
tree24d74cc7efc31ba2447c76ad301e3192e38b4cf4 /src/being
parentc551f8981eba838d07245d1597e9deaa00427cee (diff)
downloadmanaverse-1498a699f89f7b5aebdc4629c645c3702ee04f92.tar.gz
manaverse-1498a699f89f7b5aebdc4629c645c3702ee04f92.tar.bz2
manaverse-1498a699f89f7b5aebdc4629c645c3702ee04f92.tar.xz
manaverse-1498a699f89f7b5aebdc4629c645c3702ee04f92.zip
Add A_NONNULL attribute to all parameters with class Graphics.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/actor.h3
-rw-r--r--src/being/being.h19
-rw-r--r--src/being/compoundsprite.h2
3 files changed, 15 insertions, 9 deletions
diff --git a/src/being/actor.h b/src/being/actor.h
index a36c3560e..f76f7ba09 100644
--- a/src/being/actor.h
+++ b/src/being/actor.h
@@ -50,7 +50,8 @@ class Actor notfinal
* partly with the clipping rectangle support.
*/
virtual void draw(Graphics *const graphics,
- const int offsetX, const int offsetY) const = 0;
+ const int offsetX,
+ const int offsetY) const A_NONNULL(2) = 0;
/**
* Returns the horizontal size of the actors graphical representation
diff --git a/src/being/being.h b/src/being/being.h
index e957228c2..bf389c324 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -355,8 +355,9 @@ class Being notfinal : public ActorSprite,
/**
* Draws the emotion picture above the being.
*/
- void drawEmotion(Graphics *const graphics, const int offsetX,
- const int offsetY) const;
+ void drawEmotion(Graphics *const graphics,
+ const int offsetX,
+ const int offsetY) const A_NONNULL(2);
BeingTypeId getSubType() const
{ return mSubType; }
@@ -530,10 +531,13 @@ class Being notfinal : public ActorSprite,
void setState(const uint8_t state);
virtual void drawSprites(Graphics *const graphics,
- int posX, int posY) const override final;
+ int posX,
+ int posY) const override final A_NONNULL(2);
virtual void drawSpritesSDL(Graphics *const graphics,
- int posX, int posY) const override final;
+ int posX,
+ int posY) const override final
+ A_NONNULL(2);
void drawHpBar(Graphics *const graphics,
const int maxHP,
@@ -544,7 +548,7 @@ class Being notfinal : public ActorSprite,
const int x,
const int y,
const int width,
- const int height) const;
+ const int height) const A_NONNULL(2);
static void load();
@@ -622,10 +626,11 @@ class Being notfinal : public ActorSprite,
void talkTo() const;
void draw(Graphics *const graphics,
- const int offsetX, const int offsetY) const override final;
+ const int offsetX,
+ const int offsetY) const override final A_NONNULL(2);
void drawSpriteAt(Graphics *const graphics,
- const int x, const int y) const;
+ const int x, const int y) const A_NONNULL(2);
void setMoveTime()
{ mMoveTime = cur_time; }
diff --git a/src/being/compoundsprite.h b/src/being/compoundsprite.h
index 3e48ffdf7..25dee6b65 100644
--- a/src/being/compoundsprite.h
+++ b/src/being/compoundsprite.h
@@ -52,7 +52,7 @@ class CompoundSprite notfinal : public Sprite
void draw(Graphics *const graphics,
const int posX,
- const int posY) const override;
+ const int posY) const override A_NONNULL(2);
/**
* Gets the width in pixels of the first sprite in the list.