From 294271682b4113218a2098834486ec6617d1587a Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 12 Sep 2014 14:39:22 +0800 Subject: [PATCH] change return const value to value --- cocos/ui/UIButton.cpp | 2 +- cocos/ui/UIButton.h | 2 +- cocos/ui/UICheckBox.cpp | 2 +- cocos/ui/UICheckBox.h | 2 +- cocos/ui/UIImageView.cpp | 2 +- cocos/ui/UIImageView.h | 2 +- cocos/ui/UILoadingBar.cpp | 2 +- cocos/ui/UILoadingBar.h | 2 +- cocos/ui/UIRichText.cpp | 2 +- cocos/ui/UIRichText.h | 2 +- cocos/ui/UISlider.cpp | 2 +- cocos/ui/UISlider.h | 2 +- cocos/ui/UIText.cpp | 2 +- cocos/ui/UIText.h | 2 +- cocos/ui/UITextAtlas.cpp | 2 +- cocos/ui/UITextAtlas.h | 2 +- cocos/ui/UITextBMFont.cpp | 2 +- cocos/ui/UITextBMFont.h | 2 +- cocos/ui/UITextField.cpp | 2 +- cocos/ui/UITextField.h | 2 +- cocos/ui/UIWidget.cpp | 2 +- cocos/ui/UIWidget.h | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cocos/ui/UIButton.cpp b/cocos/ui/UIButton.cpp index e0419fa9e0..4525bebade 100644 --- a/cocos/ui/UIButton.cpp +++ b/cocos/ui/UIButton.cpp @@ -465,7 +465,7 @@ void Button::adaptRenderers() } } -const Size Button::getVirtualRendererSize() const +Size Button::getVirtualRendererSize() const { Size titleSize = _titleRenderer->getContentSize(); if (!_normalTextureLoaded && _titleRenderer->getString().size() > 0) { diff --git a/cocos/ui/UIButton.h b/cocos/ui/UIButton.h index 27488fcfe2..b77da59bee 100644 --- a/cocos/ui/UIButton.h +++ b/cocos/ui/UIButton.h @@ -170,7 +170,7 @@ public: virtual void ignoreContentAdaptWithSize(bool ignore) override; //override "getVirtualRendererSize" method of widget. - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; //override "getVirtualRenderer" method of widget. virtual Node* getVirtualRenderer() override; diff --git a/cocos/ui/UICheckBox.cpp b/cocos/ui/UICheckBox.cpp index 161c1288a1..d2e2a595cf 100644 --- a/cocos/ui/UICheckBox.cpp +++ b/cocos/ui/UICheckBox.cpp @@ -450,7 +450,7 @@ void CheckBox::adaptRenderers() } } -const Size CheckBox::getVirtualRendererSize() const +Size CheckBox::getVirtualRendererSize() const { return _backGroundBoxRenderer->getContentSize(); } diff --git a/cocos/ui/UICheckBox.h b/cocos/ui/UICheckBox.h index 886945a129..4b3db8edf2 100644 --- a/cocos/ui/UICheckBox.h +++ b/cocos/ui/UICheckBox.h @@ -184,7 +184,7 @@ public: //override "getVirtualRendererSize" method of widget. - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; //override "getVirtualRenderer" method of widget. virtual Node* getVirtualRenderer() override; diff --git a/cocos/ui/UIImageView.cpp b/cocos/ui/UIImageView.cpp index 9f70bec781..33b1e52dee 100644 --- a/cocos/ui/UIImageView.cpp +++ b/cocos/ui/UIImageView.cpp @@ -238,7 +238,7 @@ void ImageView::adaptRenderers() } } -const Size ImageView::getVirtualRendererSize() const +Size ImageView::getVirtualRendererSize() const { return _imageTextureSize; } diff --git a/cocos/ui/UIImageView.h b/cocos/ui/UIImageView.h index eeccb0a5c0..cdccdc7e03 100644 --- a/cocos/ui/UIImageView.h +++ b/cocos/ui/UIImageView.h @@ -108,7 +108,7 @@ public: */ virtual std::string getDescription() const override; - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; virtual Node* getVirtualRenderer() override; CC_CONSTRUCTOR_ACCESS: diff --git a/cocos/ui/UILoadingBar.cpp b/cocos/ui/UILoadingBar.cpp index 86fc034341..bee9f8a17c 100644 --- a/cocos/ui/UILoadingBar.cpp +++ b/cocos/ui/UILoadingBar.cpp @@ -265,7 +265,7 @@ void LoadingBar::ignoreContentAdaptWithSize(bool ignore) } } -const Size LoadingBar::getVirtualRendererSize() const +Size LoadingBar::getVirtualRendererSize() const { return _barRendererTextureSize; } diff --git a/cocos/ui/UILoadingBar.h b/cocos/ui/UILoadingBar.h index a13ce005b6..8e8f8317ea 100644 --- a/cocos/ui/UILoadingBar.h +++ b/cocos/ui/UILoadingBar.h @@ -130,7 +130,7 @@ public: virtual void ignoreContentAdaptWithSize(bool ignore) override; //override "getVirtualRendererSize" method of widget. - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; //override "getVirtualRenderer" method of widget. virtual Node* getVirtualRenderer() override; diff --git a/cocos/ui/UIRichText.cpp b/cocos/ui/UIRichText.cpp index a9d8ad3279..886a42ad72 100644 --- a/cocos/ui/UIRichText.cpp +++ b/cocos/ui/UIRichText.cpp @@ -451,7 +451,7 @@ void RichText::setAnchorPoint(const Vec2 &pt) _elementRenderersContainer->setAnchorPoint(pt); } -const Size RichText::getVirtualRendererSize() const +Size RichText::getVirtualRendererSize() const { return _elementRenderersContainer->getContentSize(); } diff --git a/cocos/ui/UIRichText.h b/cocos/ui/UIRichText.h index 38ed7f39c5..8dc1f47cdf 100644 --- a/cocos/ui/UIRichText.h +++ b/cocos/ui/UIRichText.h @@ -106,7 +106,7 @@ public: void setVerticalSpace(float space); virtual void setAnchorPoint(const Vec2 &pt); - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; void formatText(); virtual void ignoreContentAdaptWithSize(bool ignore); virtual std::string getDescription() const override; diff --git a/cocos/ui/UISlider.cpp b/cocos/ui/UISlider.cpp index 092ec17e19..2b25200fa2 100644 --- a/cocos/ui/UISlider.cpp +++ b/cocos/ui/UISlider.cpp @@ -449,7 +449,7 @@ void Slider::adaptRenderers() } } -const Size Slider::getVirtualRendererSize() const +Size Slider::getVirtualRendererSize() const { return _barRenderer->getContentSize(); } diff --git a/cocos/ui/UISlider.h b/cocos/ui/UISlider.h index 2dbc8bbe95..1f0056cdaa 100644 --- a/cocos/ui/UISlider.h +++ b/cocos/ui/UISlider.h @@ -194,7 +194,7 @@ public: virtual void onTouchCancelled(Touch *touch, Event *unusedEvent) override; //override "getVirtualRendererSize" method of widget. - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; //override "getVirtualRenderer" method of widget. virtual Node* getVirtualRenderer() override; diff --git a/cocos/ui/UIText.cpp b/cocos/ui/UIText.cpp index 73f511e902..2f95878d25 100644 --- a/cocos/ui/UIText.cpp +++ b/cocos/ui/UIText.cpp @@ -292,7 +292,7 @@ void Text::adaptRenderers() } } -const Size Text::getVirtualRendererSize() const +Size Text::getVirtualRendererSize() const { return _labelRenderer->getContentSize(); } diff --git a/cocos/ui/UIText.h b/cocos/ui/UIText.h index 61b1b6f39d..58b7a0715f 100644 --- a/cocos/ui/UIText.h +++ b/cocos/ui/UIText.h @@ -139,7 +139,7 @@ public: bool isTouchScaleChangeEnabled()const; //override "getVirtualRendererSize" method of widget. - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; //override "getVirtualRenderer" method of widget. virtual Node* getVirtualRenderer() override; diff --git a/cocos/ui/UITextAtlas.cpp b/cocos/ui/UITextAtlas.cpp index 533bf1a13d..a1ef656a99 100644 --- a/cocos/ui/UITextAtlas.cpp +++ b/cocos/ui/UITextAtlas.cpp @@ -135,7 +135,7 @@ void TextAtlas::adaptRenderers() } } -const Size TextAtlas::getVirtualRendererSize() const +Size TextAtlas::getVirtualRendererSize() const { return _labelAtlasRenderer->getContentSize(); } diff --git a/cocos/ui/UITextAtlas.h b/cocos/ui/UITextAtlas.h index 41d9457719..905d3c2603 100644 --- a/cocos/ui/UITextAtlas.h +++ b/cocos/ui/UITextAtlas.h @@ -93,7 +93,7 @@ public: ssize_t getStringLength()const; //override "getVirtualRendererSize" method of widget. - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; //override "getVirtualRenderer" method of widget. virtual Node* getVirtualRenderer() override; diff --git a/cocos/ui/UITextBMFont.cpp b/cocos/ui/UITextBMFont.cpp index 66df9193c6..7ee5babd20 100644 --- a/cocos/ui/UITextBMFont.cpp +++ b/cocos/ui/UITextBMFont.cpp @@ -129,7 +129,7 @@ void TextBMFont::adaptRenderers() } } -const Size TextBMFont::getVirtualRendererSize() const +Size TextBMFont::getVirtualRendererSize() const { return _labelBMFontRenderer->getContentSize(); } diff --git a/cocos/ui/UITextBMFont.h b/cocos/ui/UITextBMFont.h index 5cf2e0c2cc..56b3d2cabe 100644 --- a/cocos/ui/UITextBMFont.h +++ b/cocos/ui/UITextBMFont.h @@ -81,7 +81,7 @@ public: */ ssize_t getStringLength()const; - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; virtual Node* getVirtualRenderer() override; /** * Returns the "class name" of widget. diff --git a/cocos/ui/UITextField.cpp b/cocos/ui/UITextField.cpp index 3dfb117132..3a217ccfb2 100644 --- a/cocos/ui/UITextField.cpp +++ b/cocos/ui/UITextField.cpp @@ -737,7 +737,7 @@ void TextField::textfieldRendererScaleChangedWithSize() _textFieldRenderer->setPosition(_contentSize.width / 2.0f, _contentSize.height / 2.0f); } -const Size TextField::getVirtualRendererSize() const +Size TextField::getVirtualRendererSize() const { return _textFieldRenderer->getContentSize(); } diff --git a/cocos/ui/UITextField.h b/cocos/ui/UITextField.h index a8fe6faf16..cc256f18e7 100644 --- a/cocos/ui/UITextField.h +++ b/cocos/ui/UITextField.h @@ -187,7 +187,7 @@ public: */ virtual std::string getDescription() const override; - virtual const Size getVirtualRendererSize() const override; + virtual Size getVirtualRendererSize() const override; virtual Node* getVirtualRenderer() override; void attachWithIME(); virtual void onEnter() override; diff --git a/cocos/ui/UIWidget.cpp b/cocos/ui/UIWidget.cpp index 62db99abf1..c609e5306d 100644 --- a/cocos/ui/UIWidget.cpp +++ b/cocos/ui/UIWidget.cpp @@ -468,7 +468,7 @@ void Widget::onSizeChanged() } } -const Size Widget::getVirtualRendererSize() const +Size Widget::getVirtualRendererSize() const { return _contentSize; } diff --git a/cocos/ui/UIWidget.h b/cocos/ui/UIWidget.h index d366bf387e..5c1767dc25 100644 --- a/cocos/ui/UIWidget.h +++ b/cocos/ui/UIWidget.h @@ -489,7 +489,7 @@ public: virtual Node* getVirtualRenderer(); - virtual const Size getVirtualRendererSize() const; + virtual Size getVirtualRendererSize() const; /**