From db8dc25b019e1b5fe9e4e8e866c6224ebb945eb2 Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 21 Oct 2014 11:40:34 +0800 Subject: [PATCH] fix warning --- cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.cpp | 2 +- cocos/ui/UILayoutComponent.cpp | 2 +- cocos/ui/UILayoutComponent.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.cpp index cac7ff5178..b8d7b14cd7 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.cpp @@ -209,7 +209,7 @@ void Timeline::binarySearchKeyFrame(int frameIndex) void Timeline::updateCurrentKeyFrame(int frameIndex) { if(frameIndex > 60) - int a = 0; + //! If play to current frame's front or back, then find current frame again if (frameIndex < _currentKeyFrameIndex || frameIndex >= _currentKeyFrameIndex + _betweenDuration) { diff --git a/cocos/ui/UILayoutComponent.cpp b/cocos/ui/UILayoutComponent.cpp index 61c0681ece..19c7401d16 100644 --- a/cocos/ui/UILayoutComponent.cpp +++ b/cocos/ui/UILayoutComponent.cpp @@ -62,7 +62,7 @@ namespace ui { } //Size - const Vec2& LayoutComponent::getOwnerContentSize()const + Vec2 LayoutComponent::getOwnerContentSize()const { return this->getOwner()->getContentSize(); } diff --git a/cocos/ui/UILayoutComponent.h b/cocos/ui/UILayoutComponent.h index 1c16bfc966..b45b5ad7c0 100644 --- a/cocos/ui/UILayoutComponent.h +++ b/cocos/ui/UILayoutComponent.h @@ -68,7 +68,7 @@ NS_CC_BEGIN const Vec2& getOwnerPosition()const; void setOwnerPosition(const Vec2& point); - const Vec2& getOwnerContentSize()const; + Vec2 getOwnerContentSize()const; void setOwnerContentSize(const Vec2& size); const Vec2& getPercentContentSize()const;