From bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 12 Dec 2016 20:26:59 +0300 Subject: Add noexcept in some files. --- src/gui/widgets/browserbox.h | 18 +++++++++--------- src/gui/widgets/button.h | 16 ++++++++-------- src/gui/widgets/flowcontainer.h | 4 ++-- src/gui/widgets/guitable.h | 4 ++-- src/gui/widgets/icon.h | 2 +- src/gui/widgets/itemcontainer.h | 6 +++--- src/gui/widgets/layoutcell.h | 8 ++++---- src/gui/widgets/listbox.h | 16 ++++++++-------- src/gui/widgets/popup.h | 18 +++++++++--------- src/gui/widgets/progressbar.h | 12 ++++++------ src/gui/widgets/scrollarea.cpp | 2 +- src/gui/widgets/scrollarea.h | 4 ++-- src/gui/widgets/setupitem.h | 10 +++++----- src/gui/widgets/shortcutcontainer.h | 6 +++--- src/gui/widgets/sliderlist.h | 2 +- src/gui/widgets/tabbedarea.h | 22 +++++++++++----------- src/gui/widgets/tabs/chat/chattab.h | 14 +++++++------- src/gui/widgets/tabs/chat/whispertab.h | 2 +- src/gui/widgets/tabs/setuptab.h | 4 ++-- src/gui/widgets/tabs/setuptabscroll.h | 6 +++--- src/gui/widgets/tabs/tab.h | 4 ++-- src/gui/widgets/textbox.h | 6 +++--- src/gui/widgets/textfield.h | 2 +- src/gui/widgets/textpreview.h | 4 ++-- src/gui/widgets/widget.h | 12 ++++++------ src/gui/widgets/widget2.h | 4 ++-- src/gui/widgets/window.h | 26 +++++++++++++------------- 27 files changed, 117 insertions(+), 117 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index c578c2633..e863a2be8 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -166,36 +166,36 @@ class BrowserBox final : public Widget, typedef std::list TextRows; - TextRows &getRows() A_WARN_UNUSED + TextRows &getRows() noexcept2 A_WARN_UNUSED { return mTextRows; } - bool hasRows() const A_WARN_UNUSED + bool hasRows() const noexcept2 A_WARN_UNUSED { return !mTextRows.empty(); } - void setAlwaysUpdate(const bool n) + void setAlwaysUpdate(const bool n) noexcept2 { mAlwaysUpdate = n; } - void setProcessVars(const bool n) + void setProcessVars(const bool n) noexcept2 { mProcessVars = n; } - void setEnableImages(const bool n) + void setEnableImages(const bool n) noexcept2 { mEnableImages = n; } - void setEnableKeys(const bool n) + void setEnableKeys(const bool n) noexcept2 { mEnableKeys = n; } - void setEnableTabs(const bool n) + void setEnableTabs(const bool n) noexcept2 { mEnableTabs = n; } std::string getTextAtPos(const int x, const int y) const A_WARN_UNUSED; - int getPadding() const A_WARN_UNUSED + int getPadding() const noexcept2 A_WARN_UNUSED { return mPadding; } void setForegroundColorAll(const Color &color1, const Color &color2); - unsigned int getDataWidth() const A_WARN_UNUSED + unsigned int getDataWidth() const noexcept2 A_WARN_UNUSED { return mDataWidth; } void moveSelectionUp(); diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index 2e20be616..aaeedd553 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -167,16 +167,16 @@ class Button final : public Widget, void setDescription(const std::string &text) { mDescription = text; } - std::string getDescription() const A_WARN_UNUSED + std::string getDescription() const noexcept2 A_WARN_UNUSED { return mDescription; } - int getClickCount() const A_WARN_UNUSED + int getClickCount() const noexcept2 A_WARN_UNUSED { return mClickCount; } void setTag(int tag) { mTag = tag; } - int getTag() const A_WARN_UNUSED + int getTag() const noexcept2 A_WARN_UNUSED { return mTag; } void setStick(bool b) @@ -219,7 +219,7 @@ class Button final : public Widget, * * @return The caption of the button. */ - const std::string& getCaption() const + const std::string& getCaption() const noexcept2 A_WARN_UNUSED { return mCaption; } /** @@ -229,7 +229,7 @@ class Button final : public Widget, * @param alignment The alignment of the caption. * @see getAlignment, Graphics */ - void setAlignment(Graphics::Alignment alignment) + void setAlignment(Graphics::Alignment alignment) noexcept2 { mAlignment = alignment; } /** @@ -238,7 +238,7 @@ class Button final : public Widget, * @return The alignment of the caption. * @see setAlignment, Graphics */ - Graphics::Alignment getAlignment() const + Graphics::Alignment getAlignment() const noexcept2 A_WARN_UNUSED { return mAlignment; } void focusLost(const Event& event) override final; @@ -255,10 +255,10 @@ class Button final : public Widget, void setWindow(Widget *const widget) override final; - void setImageWidth(const int width) + void setImageWidth(const int width) noexcept2 { mImageWidth = width; } - void setImageHeight(const int height) + void setImageHeight(const int height) noexcept2 { mImageHeight = height; } enum diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h index 5e47af759..feb7f1b82 100644 --- a/src/gui/widgets/flowcontainer.h +++ b/src/gui/widgets/flowcontainer.h @@ -58,10 +58,10 @@ class FlowContainer final : public Container, */ void widgetResized(const Event &event) override final; - int getBoxWidth() const A_WARN_UNUSED + int getBoxWidth() const noexcept2 A_WARN_UNUSED { return mBoxWidth; } - int getBoxHeight() const A_WARN_UNUSED + int getBoxHeight() const noexcept2 A_WARN_UNUSED { return mBoxHeight; } void add(Widget *const widget) override final; diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h index c42ac7ff5..9849a2913 100644 --- a/src/gui/widgets/guitable.h +++ b/src/gui/widgets/guitable.h @@ -87,7 +87,7 @@ class GuiTable final : public Widget, void setSelectedColumn(const int selected); - bool isWrappingEnabled() const A_WARN_UNUSED + bool isWrappingEnabled() const noexcept2 A_WARN_UNUSED { return mWrappingEnabled; } void setWrappingEnabled(bool wrappingEnabled) @@ -142,7 +142,7 @@ class GuiTable final : public Widget, * * @return True if the table is opaque, false otherwise. */ - bool isOpaque() const A_WARN_UNUSED + bool isOpaque() const noexcept2 A_WARN_UNUSED { return mOpaque == Opaque_true; } // Inherited from MouseListener diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h index 5e7d1564f..ce471aa29 100644 --- a/src/gui/widgets/icon.h +++ b/src/gui/widgets/icon.h @@ -60,7 +60,7 @@ class Icon final : public Widget /** * Gets the current Image. */ - Image *getImage() const A_WARN_UNUSED + Image *getImage() const noexcept2 A_WARN_UNUSED { return mImage; } /** diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 006644425..b1a9c30da 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -133,13 +133,13 @@ class ItemContainer final : public Widget, void updateMatrix(); - bool getClickCount() const A_WARN_UNUSED + bool getClickCount() const noexcept2 A_WARN_UNUSED { return mClicks; } - void unsetInventory() + void unsetInventory() noexcept2 { mInventory = nullptr; } - void setInventory(Inventory *const inventory) + void setInventory(Inventory *const inventory) noexcept2 { mInventory = inventory; } void setCellBackgroundImage(const std::string &xmlName); diff --git a/src/gui/widgets/layoutcell.h b/src/gui/widgets/layoutcell.h index 2fc174ec6..05da6e934 100644 --- a/src/gui/widgets/layoutcell.h +++ b/src/gui/widgets/layoutcell.h @@ -123,16 +123,16 @@ class LayoutCell notfinal void setType(int t) { mType = t; } - int getWidth() const A_WARN_UNUSED + int getWidth() const noexcept2 A_WARN_UNUSED { return mExtent[0]; } - int getHeight() const A_WARN_UNUSED + int getHeight() const noexcept2 A_WARN_UNUSED { return mExtent[1]; } - void setWidth(const int w) + void setWidth(const int w) noexcept2 { mExtent[0] = w; } - void setHeight(const int h) + void setHeight(const int h) noexcept2 { mExtent[1] = h; } enum diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h index 97ee63ba7..423015e92 100644 --- a/src/gui/widgets/listbox.h +++ b/src/gui/widgets/listbox.h @@ -137,7 +137,7 @@ class ListBox notfinal : public Widget, void refocus(); - void setDistributeMousePressed(const bool b) + void setDistributeMousePressed(const bool b) noexcept2 { mDistributeMousePressed = b; } virtual void adjustSize(); @@ -146,16 +146,16 @@ class ListBox notfinal : public Widget, virtual int getSelectionByMouse(const int y) const; - void setCenter(const bool b) + void setCenter(const bool b) noexcept2 { mCenterText = b; } - int getPressedIndex() const + int getPressedIndex() const noexcept2 A_WARN_UNUSED { return mPressedIndex; } virtual unsigned int getRowHeight() const A_WARN_UNUSED { return mRowHeight; } - void setRowHeight(unsigned int n) + void setRowHeight(unsigned int n) noexcept2 { mRowHeight = n; } /** @@ -164,7 +164,7 @@ class ListBox notfinal : public Widget, * @return the selected item as an index in the list model. * @see setSelected */ - int getSelected() const + int getSelected() const noexcept2 A_WARN_UNUSED { return mSelected; } /** @@ -190,7 +190,7 @@ class ListBox notfinal : public Widget, * @return the list model used. * @see setListModel */ - ListModel *getListModel() const + ListModel *getListModel() const noexcept2 A_WARN_UNUSED { return mListModel; } /** @@ -205,7 +205,7 @@ class ListBox notfinal : public Widget, * @return true if wrapping is enabled, fasle otherwise. * @see setWrappingEnabled */ - bool isWrappingEnabled() const + bool isWrappingEnabled() const noexcept2 A_WARN_UNUSED { return mWrappingEnabled; } /** @@ -219,7 +219,7 @@ class ListBox notfinal : public Widget, * * @see isWrappingEnabled */ - void setWrappingEnabled(const bool wrappingEnabled) + void setWrappingEnabled(const bool wrappingEnabled) noexcept2 { mWrappingEnabled = wrappingEnabled; } /** diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h index bf09e4a51..17daa6940 100644 --- a/src/gui/widgets/popup.h +++ b/src/gui/widgets/popup.h @@ -97,7 +97,7 @@ class Popup notfinal : public Container, */ void setMinWidth(const int width); - int getMinWidth() const A_WARN_UNUSED + int getMinWidth() const noexcept2 A_WARN_UNUSED { return mMinWidth; } /** @@ -105,7 +105,7 @@ class Popup notfinal : public Container, */ void setMinHeight(const int height); - int getMinHeight() const A_WARN_UNUSED + int getMinHeight() const noexcept2 A_WARN_UNUSED { return mMinHeight; } /** @@ -113,7 +113,7 @@ class Popup notfinal : public Container, */ void setMaxWidth(const int width); - int getMaxWidth() const A_WARN_UNUSED + int getMaxWidth() const noexcept2 A_WARN_UNUSED { return mMaxWidth; } /** @@ -121,7 +121,7 @@ class Popup notfinal : public Container, */ void setMaxHeight(const int height); - int getMaxHeight() const A_WARN_UNUSED + int getMaxHeight() const noexcept2 A_WARN_UNUSED { return mMaxHeight; } /** @@ -131,19 +131,19 @@ class Popup notfinal : public Container, * @return The padding of the popup. * @see setPadding */ - int getPadding() const A_WARN_UNUSED + int getPadding() const noexcept2 A_WARN_UNUSED { return mPadding; } - void setPadding(int padding) + void setPadding(int padding) noexcept2 { mPadding = padding; } /** * Sets the name of the popup. This is only useful for debug purposes. */ - void setPopupName(const std::string &name) + void setPopupName(const std::string &name) noexcept2 { mPopupName = name; } - const std::string &getPopupName() const + const std::string &getPopupName() const noexcept2 { return mPopupName; } /** @@ -170,7 +170,7 @@ class Popup notfinal : public Container, void widgetMoved(const Event &event) override final; - bool isPopupVisible() const + bool isPopupVisible() const noexcept2 { return mVisible == Visible_true; } void postInit() override diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h index 289633f3d..92814a3c7 100644 --- a/src/gui/widgets/progressbar.h +++ b/src/gui/widgets/progressbar.h @@ -85,7 +85,7 @@ class ProgressBar final : public Widget, /** * Returns the current progress. */ - float getProgress() const A_WARN_UNUSED + float getProgress() const noexcept2 A_WARN_UNUSED { return mProgress; } /** @@ -104,7 +104,7 @@ class ProgressBar final : public Widget, /** * Returns the color of the progress bar. */ - const Color &getBackgroundColor() const A_WARN_UNUSED + const Color &getBackgroundColor() const noexcept2 A_WARN_UNUSED { return mBackgroundColor; } /** @@ -115,19 +115,19 @@ class ProgressBar final : public Widget, /** * Returns the text shown on the progress bar. */ - const std::string &text() const A_WARN_UNUSED + const std::string &text() const noexcept2 A_WARN_UNUSED { return mText; } /** * Set whether the progress is moved smoothly. */ - void setSmoothProgress(bool smoothProgress) + void setSmoothProgress(bool smoothProgress) noexcept2 { mSmoothProgress = smoothProgress; } /** * Set whether the color changing is made smoothly. */ - void setSmoothColorChange(bool smoothColorChange) + void setSmoothColorChange(bool smoothColorChange) noexcept2 { mSmoothColorChange = smoothColorChange; } void widgetResized(const Event &event) override final; @@ -136,7 +136,7 @@ class ProgressBar final : public Widget, void widgetHidden(const Event &event) override final; - void setPadding(unsigned int padding) + void setPadding(unsigned int padding) noexcept2 { mPadding = padding; } private: diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 6ec9d73d7..3a75d592c 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -1449,7 +1449,7 @@ void ScrollArea::checkPolicies() } } -bool ScrollArea::isSelectable() const +bool ScrollArea::isSelectable() const noexcept2 { if (mVBarVisible || mHBarVisible) return true; diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h index 351814b79..0738843cb 100644 --- a/src/gui/widgets/scrollarea.h +++ b/src/gui/widgets/scrollarea.h @@ -159,7 +159,7 @@ class ScrollArea final : public BasicContainer, /** * Returns whether the widget draws its background or not. */ - bool isOpaque() const A_WARN_UNUSED + bool isOpaque() const noexcept2 A_WARN_UNUSED { return mOpaque == Opaque_true; } /** @@ -432,7 +432,7 @@ class ScrollArea final : public BasicContainer, void mouseWheelMovedDown(MouseEvent& event) override final; - bool isSelectable() const override final; + bool isSelectable() const noexcept2 override final A_WARN_UNUSED; protected: enum BUTTON_DIR diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index c7bea7af7..130883886 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -74,7 +74,7 @@ class SetupItem notfinal : public ActionListener, void setWidget(Widget *widget) { mWidget = widget; } - Widget *getWidget() const A_WARN_UNUSED + Widget *getWidget() const noexcept2 A_WARN_UNUSED { return mWidget; } Configuration *getConfig() const RETURNS_NONNULL A_WARN_UNUSED; @@ -93,20 +93,20 @@ class SetupItem notfinal : public ActionListener, virtual void externalUnloaded(const std::string &eventName) A_CONST; - MainConfig isMainConfig() const A_WARN_UNUSED + MainConfig isMainConfig() const noexcept2 A_WARN_UNUSED { return mMainConfig; } void fixFirstItemSize(Widget *const widget); virtual void rereadValue(); - void setValue(const std::string &str) + void setValue(const std::string &str) noexcept2 { mValue = str; } - std::string getValue() const + std::string getValue() const noexcept2 { return mValue; } - std::string getEventName() const + std::string getEventName() const noexcept2 { return mEventName; } protected: diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index d56f74f6f..bdc679dc7 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -77,13 +77,13 @@ class ShortcutContainer notfinal : public Widget, { } - int getMaxItems() const A_WARN_UNUSED + int getMaxItems() const noexcept2 A_WARN_UNUSED { return mMaxItems; } - int getBoxWidth() const A_WARN_UNUSED + int getBoxWidth() const noexcept2 A_WARN_UNUSED { return mBoxWidth; } - int getBoxHeight() const A_WARN_UNUSED + int getBoxHeight() const noexcept2 A_WARN_UNUSED { return mBoxHeight; } void drawBackground(Graphics *const g) A_NONNULL(2); diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h index 622fa95dc..d27ad0585 100644 --- a/src/gui/widgets/sliderlist.h +++ b/src/gui/widgets/sliderlist.h @@ -69,7 +69,7 @@ class SliderList final : public Container, void adjustSize(); - int getSelected() const A_WARN_UNUSED + int getSelected() const noexcept2 A_WARN_UNUSED { return mSelectedIndex; } protected: diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 840dd84c6..6d8bc84d2 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -162,7 +162,7 @@ class TabbedArea final : public ActionListener, */ void logic() override final; - int getContainerHeight() const A_WARN_UNUSED + int getContainerHeight() const noexcept2 A_WARN_UNUSED { return mWidgetContainer->getHeight(); } void setSelectedTab(Tab *const tab); @@ -171,13 +171,13 @@ class TabbedArea final : public ActionListener, int getSelectedTabIndex() const A_WARN_UNUSED; - Tab* getSelectedTab() const A_WARN_UNUSED + Tab* getSelectedTab() const noexcept2 A_WARN_UNUSED { return mSelectedTab; } void setOpaque(const Opaque opaque) { mOpaque = opaque; } - bool isOpaque() const A_WARN_UNUSED + bool isOpaque() const noexcept2 A_WARN_UNUSED { return mOpaque == Opaque_true; } void adjustSize(); @@ -201,21 +201,21 @@ class TabbedArea final : public ActionListener, void enableScrollButtons(const bool enable); - void setRightMargin(const int n) + void setRightMargin(const int n) noexcept2 { mRightMargin = n; } - int getRightMargin() const A_WARN_UNUSED + int getRightMargin() const noexcept2 A_WARN_UNUSED { return mRightMargin; } - void setFollowDownScroll(const bool n) + void setFollowDownScroll(const bool n) noexcept2 { mFollowDownScroll = n; } - bool getFollowDownScroll() const A_WARN_UNUSED + bool getFollowDownScroll() const noexcept2 A_WARN_UNUSED { return mFollowDownScroll; } void keyPressed(KeyEvent& event) override final; - void setBlockSwitching(const bool b) + void setBlockSwitching(const bool b) noexcept2 { mBlockSwitching = b; } void setWidth(int width); @@ -228,7 +228,7 @@ class TabbedArea final : public ActionListener, void death(const Event &event) override final; - void setResizeHeight(bool b) + void setResizeHeight(bool b) noexcept2 { mResizeHeight = b; } void adjustWidget(Widget *const widget) const; @@ -237,10 +237,10 @@ class TabbedArea final : public ActionListener, void selectPrevTab(); - Widget *getTabContainer() const + Widget *getTabContainer() const noexcept2 A_WARN_UNUSED { return mTabContainer; } - Widget *getWidgetContainer() const + Widget *getWidgetContainer() const noexcept2 A_WARN_UNUSED { return mWidgetContainer; } private: diff --git a/src/gui/widgets/tabs/chat/chattab.h b/src/gui/widgets/tabs/chat/chattab.h index b1a988a8e..c14f5dafb 100644 --- a/src/gui/widgets/tabs/chat/chattab.h +++ b/src/gui/widgets/tabs/chat/chattab.h @@ -138,7 +138,7 @@ class ChatTab notfinal : public Tab /** * Returns type of the being. */ - ChatTabTypeT getType() const A_WARN_UNUSED + ChatTabTypeT getType() const noexcept2 A_WARN_UNUSED { return mType; } void saveToLogFile(const std::string &msg) const; @@ -151,22 +151,22 @@ class ChatTab notfinal : public Tab void loadFromLogFile(const std::string &name); - bool getAllowHighlight() const A_WARN_UNUSED + bool getAllowHighlight() const noexcept2 A_WARN_UNUSED { return mAllowHightlight; } - void setAllowHighlight(const bool n) + void setAllowHighlight(const bool n) noexcept2 { mAllowHightlight = n; } - bool getRemoveNames() const A_WARN_UNUSED + bool getRemoveNames() const noexcept2 A_WARN_UNUSED { return mRemoveNames; } - void setRemoveNames(const bool n) + void setRemoveNames(const bool n) noexcept2 { mRemoveNames = n; } - bool getNoAway() const A_WARN_UNUSED + bool getNoAway() const noexcept2 A_WARN_UNUSED { return mNoAway; } - void setNoAway(const bool n) + void setNoAway(const bool n) noexcept2 { mNoAway = n; } void addNewRow(std::string &line); diff --git a/src/gui/widgets/tabs/chat/whispertab.h b/src/gui/widgets/tabs/chat/whispertab.h index f298bf164..58fc1515d 100644 --- a/src/gui/widgets/tabs/chat/whispertab.h +++ b/src/gui/widgets/tabs/chat/whispertab.h @@ -33,7 +33,7 @@ class WhisperTab final : public ChatTab public: A_DELETE_COPY(WhisperTab) - const std::string &getNick() const A_WARN_UNUSED + const std::string &getNick() const noexcept2 A_WARN_UNUSED { return mNick; } bool handleCommand(const std::string &restrict type, diff --git a/src/gui/widgets/tabs/setuptab.h b/src/gui/widgets/tabs/setuptab.h index 9eadd6537..6d23bfe62 100644 --- a/src/gui/widgets/tabs/setuptab.h +++ b/src/gui/widgets/tabs/setuptab.h @@ -40,7 +40,7 @@ class SetupTab notfinal : public Container, public: A_DELETE_COPY(SetupTab) - const std::string &getName() const A_WARN_UNUSED + const std::string &getName() const noexcept2 A_WARN_UNUSED { return mName; } /** @@ -64,7 +64,7 @@ class SetupTab notfinal : public Container, * Sets the name displayed on the tab. Should be set in the * constructor of a subclass. */ - void setName(const std::string &name) + void setName(const std::string &name) noexcept2 { mName = name; } private: diff --git a/src/gui/widgets/tabs/setuptabscroll.h b/src/gui/widgets/tabs/setuptabscroll.h index 30e771c05..9ac14b072 100644 --- a/src/gui/widgets/tabs/setuptabscroll.h +++ b/src/gui/widgets/tabs/setuptabscroll.h @@ -42,7 +42,7 @@ class SetupTabScroll notfinal : public SetupTab void addControl(SetupItem *const widget, const std::string &event); - VertContainer *getContainer() const A_WARN_UNUSED + VertContainer *getContainer() const noexcept2 A_WARN_UNUSED { return mContainer; } void apply() override; @@ -56,7 +56,7 @@ class SetupTabScroll notfinal : public SetupTab void action(const ActionEvent &event A_UNUSED) override final { } - int getPreferredFirstItemSize() const A_WARN_UNUSED + int getPreferredFirstItemSize() const noexcept2 A_WARN_UNUSED { return mPreferredFirstItemSize; } void widgetResized(const Event &event) override final; @@ -65,7 +65,7 @@ class SetupTabScroll notfinal : public SetupTab void clear() override final; - const std::set &getAllItems() const + const std::set &getAllItems() const noexcept2 { return mAllItems; } protected: diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h index 042d0e0a8..a64f6e39a 100644 --- a/src/gui/widgets/tabs/tab.h +++ b/src/gui/widgets/tabs/tab.h @@ -174,7 +174,7 @@ class Tab notfinal : public BasicContainer, void setFlash(const int flash) { mFlash = flash; mRedraw = true; } - int getFlash() const A_WARN_UNUSED + int getFlash() const noexcept2 A_WARN_UNUSED { return mFlash; } void widgetResized(const Event &event) override final; @@ -183,7 +183,7 @@ class Tab notfinal : public BasicContainer, void setLabelFont(Font *const font); - Label *getLabel() const A_WARN_UNUSED + Label *getLabel() const noexcept2 A_WARN_UNUSED { return mLabel; } void adjustSize(); diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h index 097c772b8..c0f8b9da6 100644 --- a/src/gui/widgets/textbox.h +++ b/src/gui/widgets/textbox.h @@ -104,7 +104,7 @@ class TextBox final : public Widget, /** * Get the minimum text width for the text box. */ - int getMinWidth() const A_WARN_UNUSED + int getMinWidth() const noexcept2 A_WARN_UNUSED { return mMinWidth; } void keyPressed(KeyEvent& event) override final; @@ -259,7 +259,7 @@ class TextBox final : public Widget, * @return True if the text box is opaque, false otherwise. * @see setOpaque */ - bool isOpaque() const + bool isOpaque() const noexcept2 { return mOpaque == Opaque_true; } /** @@ -270,7 +270,7 @@ class TextBox final : public Widget, * @param opaque True if the text box should be opaque, false otherwise. * @see isOpaque */ - void setOpaque(const Opaque opaque) + void setOpaque(const Opaque opaque) noexcept2 { mOpaque = opaque; } void fontChanged() override final diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h index 359d54971..263533c54 100644 --- a/src/gui/widgets/textfield.h +++ b/src/gui/widgets/textfield.h @@ -164,7 +164,7 @@ class TextField notfinal : public Widget, */ int getValue() const A_WARN_UNUSED; - void setSendAlwaysEvents(const bool b) + void setSendAlwaysEvents(const bool b) noexcept2 { mSendAlwaysEvents = b; } void adjustSize(); diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h index ccd552a57..5a2eaa441 100644 --- a/src/gui/widgets/textpreview.h +++ b/src/gui/widgets/textpreview.h @@ -112,14 +112,14 @@ class TextPreview final : public Widget * * @param opaque Whether the widget should be opaque or not */ - void setOpaque(const Opaque opaque) + void setOpaque(const Opaque opaque) noexcept2 { mOpaque = opaque; } /** * Gets opacity for this widget (whether or not the background color * is shown below the widget) */ - bool isOpaque() const A_WARN_UNUSED + bool isOpaque() const noexcept2 A_WARN_UNUSED { return mOpaque == Opaque_true; } void adjustSize(); diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h index cbeb68874..f1bf4e63f 100644 --- a/src/gui/widgets/widget.h +++ b/src/gui/widgets/widget.h @@ -226,7 +226,7 @@ class Widget notfinal : public Widget2 * setDimension, getDimension * @since 0.1.0 */ - int getWidth() const A_WARN_UNUSED + int getWidth() const noexcept2 A_WARN_UNUSED { return mDimension.width; } /** @@ -247,7 +247,7 @@ class Widget notfinal : public Widget2 * setDimension, getDimension * @since 0.1.0 */ - int getHeight() const A_WARN_UNUSED + int getHeight() const noexcept2 A_WARN_UNUSED { return mDimension.height; } /** @@ -279,7 +279,7 @@ class Widget notfinal : public Widget2 * @see setX, setY, getY, setPosition, setDimension, getDimension * @since 0.1.0 */ - int getX() const A_WARN_UNUSED + int getX() const noexcept2 A_WARN_UNUSED { return mDimension.x; } /** @@ -300,7 +300,7 @@ class Widget notfinal : public Widget2 * @see setY, setX, getX, setPosition, setDimension, getDimension * @since 0.1.0 */ - int getY() const A_WARN_UNUSED + int getY() const noexcept2 A_WARN_UNUSED { return mDimension.y; } /** @@ -1023,10 +1023,10 @@ class Widget notfinal : public Widget2 void setRedraw(const bool b) noexcept2 { mRedraw = b; } - virtual bool isSelectable() const A_WARN_UNUSED + virtual bool isSelectable() const noexcept2 A_WARN_UNUSED { return mSelectable; } - void setSelectable(const bool selectable) + void setSelectable(const bool selectable) noexcept2 { mSelectable = selectable; } static void distributeWindowResizeEvent(); diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h index 77af3d216..5a7ad3d53 100644 --- a/src/gui/widgets/widget2.h +++ b/src/gui/widgets/widget2.h @@ -82,12 +82,12 @@ class Widget2 notfinal } } - void setForegroundColor2(const Color &color) + void setForegroundColor2(const Color &color) noexcept2 { mForegroundColor2 = color; } - Widget* getWindow() const A_WARN_UNUSED + Widget* getWindow() const noexcept2 A_WARN_UNUSED { return mWindow; } diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index bc77264a2..61e6429e1 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -181,13 +181,13 @@ class Window notfinal : public BasicContainer2, */ void setCloseButton(const bool flag); - bool getCloseButton() const A_WARN_UNUSED + bool getCloseButton() const noexcept2 A_WARN_UNUSED { return mCloseWindowButton; } void setAllowClose(const bool b) { mAllowClose = b; } - bool getAlowClose() const A_WARN_UNUSED + bool getAlowClose() const noexcept2 A_WARN_UNUSED { return mCloseWindowButton || mAllowClose; } /** @@ -200,7 +200,7 @@ class Window notfinal : public BasicContainer2, */ void setMinWidth(const int width); - int getMinWidth() const A_WARN_UNUSED + int getMinWidth() const noexcept2 A_WARN_UNUSED { return mMinWinWidth; } /** @@ -208,7 +208,7 @@ class Window notfinal : public BasicContainer2, */ void setMinHeight(const int height); - int getMinHeight() const A_WARN_UNUSED + int getMinHeight() const noexcept2 A_WARN_UNUSED { return mMinWinHeight; } /** @@ -216,7 +216,7 @@ class Window notfinal : public BasicContainer2, */ void setMaxWidth(const int width); - int getMaxWidth() const A_WARN_UNUSED + int getMaxWidth() const noexcept2 A_WARN_UNUSED { return mMaxWinWidth; } /** @@ -224,7 +224,7 @@ class Window notfinal : public BasicContainer2, */ void setMaxHeight(const int height); - int getMaxHeight() const A_WARN_UNUSED + int getMaxHeight() const noexcept2 A_WARN_UNUSED { return mMaxWinHeight; } /** @@ -248,7 +248,7 @@ class Window notfinal : public BasicContainer2, /** * Returns whether the window is sticky. */ - bool isSticky() const A_WARN_UNUSED + bool isSticky() const noexcept2 A_WARN_UNUSED { return mSticky; } /** @@ -259,7 +259,7 @@ class Window notfinal : public BasicContainer2, /** * Returns whether the window sticky locking window. */ - bool isStickyButtonLock() const A_WARN_UNUSED + bool isStickyButtonLock() const noexcept2 A_WARN_UNUSED { return mStickyButtonLock; } /** @@ -277,7 +277,7 @@ class Window notfinal : public BasicContainer2, /** * Returns whether the window is visible by default. */ - bool isDefaultVisible() const A_WARN_UNUSED + bool isDefaultVisible() const noexcept2 A_WARN_UNUSED { return mDefaultVisible; } /** @@ -357,7 +357,7 @@ class Window notfinal : public BasicContainer2, /** * Returns the name of the window. This is not the window title. */ - const std::string &getWindowName() const A_WARN_UNUSED + const std::string &getWindowName() const noexcept2 A_WARN_UNUSED { return mWindowName; } /** @@ -474,7 +474,7 @@ class Window notfinal : public BasicContainer2, void enableVisibleSound(bool b) { mPlayVisibleSound = b; } - bool isWindowVisible() const A_WARN_UNUSED + bool isWindowVisible() const noexcept2 A_WARN_UNUSED { return mVisible == Visible_true; } /** @@ -589,10 +589,10 @@ class Window notfinal : public BasicContainer2, bool getOptionBool(const std::string &name, const bool def = false) const A_WARN_UNUSED; - void setTitlePadding(const int p) + void setTitlePadding(const int p) noexcept2 { mTitlePadding = p; } - int getTitlePadding() const A_WARN_UNUSED + int getTitlePadding() const noexcept2 A_WARN_UNUSED { return mTitlePadding; } /** -- cgit v1.2.3-60-g2f50