diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-24 01:13:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-24 01:13:26 +0300 |
commit | 1498a699f89f7b5aebdc4629c645c3702ee04f92 (patch) | |
tree | 24d74cc7efc31ba2447c76ad301e3192e38b4cf4 /src/gui/widgets | |
parent | c551f8981eba838d07245d1597e9deaa00427cee (diff) | |
download | mv-1498a699f89f7b5aebdc4629c645c3702ee04f92.tar.gz mv-1498a699f89f7b5aebdc4629c645c3702ee04f92.tar.bz2 mv-1498a699f89f7b5aebdc4629c645c3702ee04f92.tar.xz mv-1498a699f89f7b5aebdc4629c645c3702ee04f92.zip |
Add A_NONNULL attribute to all parameters with class Graphics.
Diffstat (limited to 'src/gui/widgets')
38 files changed, 94 insertions, 90 deletions
diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h index 7c59f0924..3040b3261 100644 --- a/src/gui/widgets/avatarlistbox.h +++ b/src/gui/widgets/avatarlistbox.h @@ -41,9 +41,9 @@ class AvatarListBox final : public ListBox, /** * Draws the list box. */ - void draw(Graphics *gcnGraphics) override final; + void draw(Graphics *gcnGraphics) override final A_NONNULL(2); - void safeDraw(Graphics *gcnGraphics) override final; + void safeDraw(Graphics *gcnGraphics) override final A_NONNULL(2); void mousePressed(MouseEvent &event) override final; diff --git a/src/gui/widgets/basiccontainer2.h b/src/gui/widgets/basiccontainer2.h index 7243e68d3..dc5a65234 100644 --- a/src/gui/widgets/basiccontainer2.h +++ b/src/gui/widgets/basiccontainer2.h @@ -137,9 +137,9 @@ class BasicContainer2: public BasicContainer // Inherited from Widget - void draw(Graphics* graphics) override; + void draw(Graphics* graphics) override A_NONNULL(2); - void safeDraw(Graphics* graphics) override; + void safeDraw(Graphics* graphics) override A_NONNULL(2); protected: /** diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index 012c04dd7..a3e7ad7f2 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -122,9 +122,9 @@ class BrowserBox final : public Widget, /** * Draws the browser box. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); void updateHeight(); diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index 233906d06..a4222c395 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -151,9 +151,9 @@ class Button final : public Widget, /** * Draws the button. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Update the alpha value to the button components. diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h index 2f2fe812d..23b75ddae 100644 --- a/src/gui/widgets/checkbox.h +++ b/src/gui/widgets/checkbox.h @@ -109,9 +109,9 @@ class CheckBox final : public Widget, /** * Draws the caption, then calls drawBox to draw the check box. */ - void draw(Graphics *const graphics) override final; + void draw(Graphics *const graphics) override final A_NONNULL(2); - void safeDraw(Graphics *const graphics) override final; + void safeDraw(Graphics *const graphics) override final A_NONNULL(2); /** * Update the alpha value to the checkbox components. @@ -121,7 +121,7 @@ class CheckBox final : public Widget, /** * Draws the check box, not the caption. */ - void drawBox(Graphics *const graphics); + void drawBox(Graphics *const graphics) A_NONNULL(2); /** * Called when the mouse enteres the widget area. diff --git a/src/gui/widgets/colorpage.h b/src/gui/widgets/colorpage.h index 4863aaa60..7049ef2bc 100644 --- a/src/gui/widgets/colorpage.h +++ b/src/gui/widgets/colorpage.h @@ -36,9 +36,9 @@ class ColorPage final : public ListBox ~ColorPage(); - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); void resetAction(); diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h index 21da974cd..ec75c588d 100644 --- a/src/gui/widgets/desktop.h +++ b/src/gui/widgets/desktop.h @@ -65,9 +65,9 @@ class Desktop final : public Container, void widgetResized(const Event &event) override final; - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); void postInit() override final; diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index aea2752d0..df8e93d49 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -79,13 +79,13 @@ class DropDown final : public ActionListener, */ void updateAlpha(); - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); - void drawFrame(Graphics *graphics) override final; + void drawFrame(Graphics *graphics) override final A_NONNULL(2); - void safeDrawFrame(Graphics *graphics) override final; + void safeDrawFrame(Graphics *graphics) override final A_NONNULL(2); // Inherited from KeyListener diff --git a/src/gui/widgets/emotepage.h b/src/gui/widgets/emotepage.h index 24d166750..74829c13e 100644 --- a/src/gui/widgets/emotepage.h +++ b/src/gui/widgets/emotepage.h @@ -39,9 +39,9 @@ class EmotePage final : public Widget, ~EmotePage(); - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); void mousePressed(MouseEvent &event) override final; diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h index c1ba76b2b..9dba54e5f 100644 --- a/src/gui/widgets/emoteshortcutcontainer.h +++ b/src/gui/widgets/emoteshortcutcontainer.h @@ -49,9 +49,9 @@ class EmoteShortcutContainer final : public ShortcutContainer /** * Draws the items. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Handles mouse when dragged. diff --git a/src/gui/widgets/extendedlistbox.h b/src/gui/widgets/extendedlistbox.h index aca0ba8a8..3f2e30af4 100644 --- a/src/gui/widgets/extendedlistbox.h +++ b/src/gui/widgets/extendedlistbox.h @@ -42,9 +42,9 @@ class ExtendedListBox final : public ListBox /** * Draws the list box. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); void adjustSize() override; diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h index af94c4ec9..ff9342661 100644 --- a/src/gui/widgets/guitable.h +++ b/src/gui/widgets/guitable.h @@ -110,9 +110,9 @@ class GuiTable final : public Widget, { mLinewiseMode = linewise; } // Inherited from Widget - void draw(Graphics* graphics) override final; + void draw(Graphics* graphics) override final A_NONNULL(2); - void safeDraw(Graphics* graphics) override final; + void safeDraw(Graphics* graphics) override final A_NONNULL(2); Widget *getWidgetAt(int x, int y) override final A_WARN_UNUSED; diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 8b30e5f8b..243104ead 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -74,9 +74,9 @@ class ItemContainer final : public Widget, /** * Draws the items. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); // KeyListener void keyPressed(KeyEvent &event) override final; diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h index a211941c2..424db2ac3 100644 --- a/src/gui/widgets/itemshortcutcontainer.h +++ b/src/gui/widgets/itemshortcutcontainer.h @@ -49,9 +49,9 @@ class ItemShortcutContainer final : public ShortcutContainer /** * Draws the items. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Handles mouse when dragged. diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h index bbe49a1e0..fd7e144e0 100644 --- a/src/gui/widgets/label.h +++ b/src/gui/widgets/label.h @@ -108,9 +108,9 @@ class Label final : public Widget, /** * Draws the label. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); void adjustSize(); diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h index 9dff11e09..382f56dfe 100644 --- a/src/gui/widgets/listbox.h +++ b/src/gui/widgets/listbox.h @@ -108,9 +108,9 @@ class ListBox notfinal : public Widget, /** * Draws the list box. */ - void draw(Graphics *graphics) override; + void draw(Graphics *graphics) override A_NONNULL(2); - void safeDraw(Graphics *graphics) override; + void safeDraw(Graphics *graphics) override A_NONNULL(2); /** * Update the alpha value to the graphic components. diff --git a/src/gui/widgets/passwordfield.h b/src/gui/widgets/passwordfield.h index 0efce0dcf..6b3da5e50 100644 --- a/src/gui/widgets/passwordfield.h +++ b/src/gui/widgets/passwordfield.h @@ -44,9 +44,9 @@ class PasswordField final : public TextField /** * Draws the password field. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); protected: unsigned char mPasswordChar; diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h index b331b7a1b..ee15f32ba 100644 --- a/src/gui/widgets/playerbox.h +++ b/src/gui/widgets/playerbox.h @@ -76,9 +76,9 @@ class PlayerBox final : public Widget, /** * Draws the scroll area. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Draws the background and border of the scroll area. diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h index a784990ec..9f043114e 100644 --- a/src/gui/widgets/popup.h +++ b/src/gui/widgets/popup.h @@ -76,9 +76,9 @@ class Popup notfinal : public Container, /** * Draws the popup. */ - void draw(Graphics *graphics) override; + void draw(Graphics *graphics) override A_NONNULL(2); - void safeDraw(Graphics *graphics) override; + void safeDraw(Graphics *graphics) override A_NONNULL(2); /** * Sets the size of this popup. diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h index 89ee13e85..4b45f1aab 100644 --- a/src/gui/widgets/progressbar.h +++ b/src/gui/widgets/progressbar.h @@ -71,9 +71,9 @@ class ProgressBar final : public Widget, /** * Draws the progress bar. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Sets the current progress. diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h index cc278e8a2..6957b6993 100644 --- a/src/gui/widgets/progressindicator.h +++ b/src/gui/widgets/progressindicator.h @@ -43,9 +43,9 @@ class ProgressIndicator final : public Widget void logic() override final; - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); private: SimpleAnimation *mIndicator; diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h index f1e4748e1..50b000f31 100644 --- a/src/gui/widgets/radiobutton.h +++ b/src/gui/widgets/radiobutton.h @@ -112,9 +112,9 @@ class RadioButton final : public Widget, * Implementation of the draw methods. * Thus, avoiding the rhomb around the radio button. */ - void draw(Graphics* graphics) override final; + void draw(Graphics* graphics) override final A_NONNULL(2); - void safeDraw(Graphics* graphics) override final; + void safeDraw(Graphics* graphics) override final A_NONNULL(2); /** * Called when the mouse enteres the widget area. diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h index deb24ff79..5d9b2e70b 100644 --- a/src/gui/widgets/scrollarea.h +++ b/src/gui/widgets/scrollarea.h @@ -137,9 +137,9 @@ class ScrollArea final : public BasicContainer, /** * Draws the scroll area. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Draws the background and border of the scroll area. @@ -449,21 +449,23 @@ class ScrollArea final : public BasicContainer, */ void checkPolicies(); - void drawButton(Graphics *const graphics, const BUTTON_DIR dir); - void calcButton(Graphics *const graphics, const BUTTON_DIR dir); - void drawVBar(Graphics *const graphics) const; - void drawHBar(Graphics *const graphics) const; - void drawVMarker(Graphics *const graphics); - void drawHMarker(Graphics *const graphics); + void drawButton(Graphics *const graphics, + const BUTTON_DIR dir) A_NONNULL(2); + void calcButton(Graphics *const graphics, + const BUTTON_DIR dir) A_NONNULL(2); + void drawVBar(Graphics *const graphics) const A_NONNULL(2); + void drawHBar(Graphics *const graphics) const A_NONNULL(2); + void drawVMarker(Graphics *const graphics) A_NONNULL(2); + void drawHMarker(Graphics *const graphics) A_NONNULL(2); - void calcVBar(const Graphics *const graphics); - void calcHBar(const Graphics *const graphics); - void calcVMarker(Graphics *const graphics); - void calcHMarker(Graphics *const graphics); + void calcVBar(const Graphics *const graphics) A_NONNULL(2); + void calcHBar(const Graphics *const graphics) A_NONNULL(2); + void calcVMarker(Graphics *const graphics) A_NONNULL(2); + void calcHMarker(Graphics *const graphics) A_NONNULL(2); Image *getImageByState(Rect &dim, const BUTTON_DIR dir); - void updateCalcFlag(Graphics *const graphics); + void updateCalcFlag(Graphics *const graphics) A_NONNULL(2); static int instances; static float mAlpha; diff --git a/src/gui/widgets/serverslistbox.h b/src/gui/widgets/serverslistbox.h index 5586cf1d1..e15bebb41 100644 --- a/src/gui/widgets/serverslistbox.h +++ b/src/gui/widgets/serverslistbox.h @@ -43,7 +43,7 @@ class ServersListBox final : public ListBox mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT); } - void draw(Graphics *graphics) override final + void draw(Graphics *graphics) override final A_NONNULL(2) { if (!mListModel) return; diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h index ff7835dd0..d0c230f9d 100644 --- a/src/gui/widgets/shoplistbox.h +++ b/src/gui/widgets/shoplistbox.h @@ -55,9 +55,9 @@ class ShopListBox final : public ListBox /** * Draws the list box. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * gives information about the current player's money diff --git a/src/gui/widgets/skilllistbox.h b/src/gui/widgets/skilllistbox.h index 4eda139a5..a27c57147 100644 --- a/src/gui/widgets/skilllistbox.h +++ b/src/gui/widgets/skilllistbox.h @@ -90,7 +90,7 @@ class SkillListBox final : public ListBox return static_cast<SkillModel*>(mListModel)->getSkillAt(selected); } - void draw(Graphics *graphics) override final + void draw(Graphics *graphics) override final A_NONNULL(2) { if (!mListModel) return; diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h index d31c9e9fc..256c64819 100644 --- a/src/gui/widgets/slider.h +++ b/src/gui/widgets/slider.h @@ -125,9 +125,9 @@ class Slider final : public Widget, /** * Draws the slider. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Called when the mouse enteres the widget area. diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h index a48ffeb4a..525fd3c92 100644 --- a/src/gui/widgets/sliderlist.h +++ b/src/gui/widgets/sliderlist.h @@ -55,9 +55,9 @@ class SliderList final : public Container, void resize(); - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); void action(const ActionEvent &event) override final; diff --git a/src/gui/widgets/spellshortcutcontainer.h b/src/gui/widgets/spellshortcutcontainer.h index eb2dbec49..21fc0d5b9 100644 --- a/src/gui/widgets/spellshortcutcontainer.h +++ b/src/gui/widgets/spellshortcutcontainer.h @@ -49,9 +49,9 @@ class SpellShortcutContainer final : public ShortcutContainer /** * Draws the items. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Handles mouse when dragged. diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 3d123f2ec..40ac05753 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -102,9 +102,9 @@ class TabbedArea final : public ActionListener, /** * Draw the tabbed area. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Return how many tabs have been created. diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h index 65ebc57b7..ded1e6709 100644 --- a/src/gui/widgets/tabs/tab.h +++ b/src/gui/widgets/tabs/tab.h @@ -109,9 +109,9 @@ class Tab notfinal : public BasicContainer, /** * Draw the tabbed area. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Set the normal color for the tab's text. diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h index 611efd4a0..6fe3aefd9 100644 --- a/src/gui/widgets/textbox.h +++ b/src/gui/widgets/textbox.h @@ -107,9 +107,9 @@ class TextBox final : public Widget, void keyPressed(KeyEvent& event) override final; - void draw(Graphics* graphics) override final; + void draw(Graphics* graphics) override final A_NONNULL(2); - void safeDraw(Graphics* graphics) override final; + void safeDraw(Graphics* graphics) override final A_NONNULL(2); void setForegroundColor(const Color &color); @@ -287,7 +287,9 @@ class TextBox final : public Widget, * @param x the x position. * @param y the y position. */ - void drawCaret(Graphics *const graphics, const int x, const int y); + void drawCaret(Graphics *const graphics, + const int x, + const int y) A_NONNULL(2); /** * Adjusts the text box's size to fit the text. diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h index 0c5335143..75c3d9253 100644 --- a/src/gui/widgets/textfield.h +++ b/src/gui/widgets/textfield.h @@ -107,9 +107,9 @@ class TextField notfinal : public Widget, /** * Draws the text field. */ - void draw(Graphics *graphics) override; + void draw(Graphics *graphics) override A_NONNULL(2); - void safeDraw(Graphics *graphics) override; + void safeDraw(Graphics *graphics) override A_NONNULL(2); /** * Update the alpha value to the graphic components. diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h index 62e3d1cd1..f56eac5bb 100644 --- a/src/gui/widgets/textpreview.h +++ b/src/gui/widgets/textpreview.h @@ -100,9 +100,9 @@ class TextPreview final : public Widget * * @param graphics graphics to draw into */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Set opacity for this widget (whether or not to show the background diff --git a/src/gui/widgets/virtshortcutcontainer.h b/src/gui/widgets/virtshortcutcontainer.h index 96aea1012..5405c2046 100644 --- a/src/gui/widgets/virtshortcutcontainer.h +++ b/src/gui/widgets/virtshortcutcontainer.h @@ -51,9 +51,9 @@ class VirtShortcutContainer final : public ShortcutContainer /** * Draws the items. */ - void draw(Graphics *graphics) override final; + void draw(Graphics *graphics) override final A_NONNULL(2); - void safeDraw(Graphics *graphics) override final; + void safeDraw(Graphics *graphics) override final A_NONNULL(2); /** * Handles mouse when dragged. diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h index 416782dc2..c5573b404 100644 --- a/src/gui/widgets/widget.h +++ b/src/gui/widgets/widget.h @@ -121,9 +121,9 @@ class Widget notfinal : public Widget2 * @param graphics aA graphics object to draw with. * @since 0.1.0 */ - virtual void draw(Graphics* graphics) = 0; + virtual void draw(Graphics* graphics) A_NONNULL(2) = 0; - virtual void safeDraw(Graphics* graphics) = 0; + virtual void safeDraw(Graphics* graphics) A_NONNULL(2) = 0; /** * Called when a widget is given a chance to draw a frame around itself. @@ -145,10 +145,10 @@ class Widget notfinal : public Widget2 * @see setFrameSize, getFrameSize * @since 0.8.0 */ - virtual void drawFrame(Graphics* graphics A_UNUSED) + virtual void drawFrame(Graphics* graphics A_UNUSED) A_NONNULL(2) { } - virtual void safeDrawFrame(Graphics* graphics A_UNUSED) + virtual void safeDrawFrame(Graphics* graphics A_UNUSED) A_NONNULL(2) { } /** diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index e062de671..ae1e922c9 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -128,9 +128,9 @@ class Window notfinal : public BasicContainer2, /** * Draws the window. */ - void draw(Graphics *graphics) override; + void draw(Graphics *graphics) override A_NONNULL(2); - void safeDraw(Graphics *graphics) override; + void safeDraw(Graphics *graphics) override A_NONNULL(2); /** * Sets the size of this window. diff --git a/src/gui/widgets/windowcontainer.h b/src/gui/widgets/windowcontainer.h index 59fd54af1..6188777d2 100644 --- a/src/gui/widgets/windowcontainer.h +++ b/src/gui/widgets/windowcontainer.h @@ -55,7 +55,7 @@ class WindowContainer notfinal : public Container Widget *const widget); #ifdef USE_PROFILER - void draw(Graphics* graphics) override; + void draw(Graphics* graphics) override A_NONNULL(2); #endif private: |