Commit 51c96224110c0d3c84890c973e8b4151a2a7b150

Authored by Eunki, Hong
1 parent 53fd8fe6

Minor coverity issue fixes

Fix some minor coverity issues that might has meanful

1. Initialize member value
2. Remove useless std::move
3. Remove const keyword for function return value.

Change-Id: Ie1ecaa3394607ea724a2074b991cee6681122bef
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
examples/builder/examples.cpp
1 /* 1 /*
2 - * Copyright (c) 2021 Samsung Electronics Co., Ltd. 2 + * Copyright (c) 2022 Samsung Electronics Co., Ltd.
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
@@ -164,6 +164,8 @@ public: @@ -164,6 +164,8 @@ public:
164 FileWatcher(void); 164 FileWatcher(void);
165 ~FileWatcher(void); 165 ~FileWatcher(void);
166 explicit FileWatcher(const std::string& fn) 166 explicit FileWatcher(const std::string& fn)
  167 + : mLastTime(0),
  168 + mstringPath{}
167 { 169 {
168 SetFilename(fn); 170 SetFilename(fn);
169 }; 171 };
@@ -187,7 +189,8 @@ private: @@ -187,7 +189,8 @@ private:
187 }; 189 };
188 190
189 FileWatcher::FileWatcher(void) 191 FileWatcher::FileWatcher(void)
190 -: mLastTime(0) 192 +: mLastTime(0),
  193 + mstringPath{}
191 { 194 {
192 } 195 }
193 196
examples/gestures/gesture-example.cpp
1 /* 1 /*
2 - * Copyright (c) 2020 Samsung Electronics Co., Ltd. 2 + * Copyright (c) 2022 Samsung Electronics Co., Ltd.
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
@@ -74,7 +74,7 @@ const float ROTATE_BACK_ANIMATION_DURATION(0.25f); @@ -74,7 +74,7 @@ const float ROTATE_BACK_ANIMATION_DURATION(0.25f);
74 */ 74 */
75 void AddHelpInfo(const std::string&& string, const Vector2& windowSize, Actor parent, Animation animation, float startTime, float endTime) 75 void AddHelpInfo(const std::string&& string, const Vector2& windowSize, Actor parent, Animation animation, float startTime, float endTime)
76 { 76 {
77 - Actor text = TextLabel::New(std::move(string)); 77 + Actor text = TextLabel::New(string);
78 Vector3 position(windowSize * HELP_TEXT_POSITION_MULTIPLIER); 78 Vector3 position(windowSize * HELP_TEXT_POSITION_MULTIPLIER);
79 79
80 text.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER); 80 text.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER);
examples/scroll-view/scroll-view-example.cpp
1 /* 1 /*
2 - * Copyright (c) 2020 Samsung Electronics Co., Ltd. 2 + * Copyright (c) 2022 Samsung Electronics Co., Ltd.
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
@@ -105,7 +105,7 @@ const char* const IMAGE_PATHS[] = { @@ -105,7 +105,7 @@ const char* const IMAGE_PATHS[] = {
105 105
106 NULL}; 106 NULL};
107 107
108 -const char* const GetNextImagePath() 108 +const char* GetNextImagePath()
109 { 109 {
110 static const char* const* imagePtr = &IMAGE_PATHS[0]; 110 static const char* const* imagePtr = &IMAGE_PATHS[0];
111 111