summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEunki, Hong <eunkiki.hong@samsung.com>2022-10-05 23:03:00 +0900
committerEunki, Hong <eunkiki.hong@samsung.com>2022-10-18 21:49:43 +0900
commit51c96224110c0d3c84890c973e8b4151a2a7b150 (patch)
tree8cbad4d8226cc6d42b84c52c861f517378c61037 /examples
parent53fd8fe6fbe07d770e058804ec0475599663a1c9 (diff)
downloaddali-demo-51c96224110c0d3c84890c973e8b4151a2a7b150.tar.gz
dali-demo-51c96224110c0d3c84890c973e8b4151a2a7b150.tar.bz2
dali-demo-51c96224110c0d3c84890c973e8b4151a2a7b150.zip
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>
Diffstat (limited to 'examples')
-rw-r--r--examples/builder/examples.cpp7
-rw-r--r--examples/gestures/gesture-example.cpp4
-rw-r--r--examples/scroll-view/scroll-view-example.cpp4
3 files changed, 9 insertions, 6 deletions
diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp
index 7ba6fef6..fd5d42ae 100644
--- a/examples/builder/examples.cpp
+++ b/examples/builder/examples.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -164,6 +164,8 @@ public:
FileWatcher(void);
~FileWatcher(void);
explicit FileWatcher(const std::string& fn)
+ : mLastTime(0),
+ mstringPath{}
{
SetFilename(fn);
};
@@ -187,7 +189,8 @@ private:
};
FileWatcher::FileWatcher(void)
-: mLastTime(0)
+: mLastTime(0),
+ mstringPath{}
{
}
diff --git a/examples/gestures/gesture-example.cpp b/examples/gestures/gesture-example.cpp
index 129a1b75..04f783a2 100644
--- a/examples/gestures/gesture-example.cpp
+++ b/examples/gestures/gesture-example.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -74,7 +74,7 @@ const float ROTATE_BACK_ANIMATION_DURATION(0.25f);
*/
void AddHelpInfo(const std::string&& string, const Vector2& windowSize, Actor parent, Animation animation, float startTime, float endTime)
{
- Actor text = TextLabel::New(std::move(string));
+ Actor text = TextLabel::New(string);
Vector3 position(windowSize * HELP_TEXT_POSITION_MULTIPLIER);
text.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER);
diff --git a/examples/scroll-view/scroll-view-example.cpp b/examples/scroll-view/scroll-view-example.cpp
index 1f62db96..c1374b1d 100644
--- a/examples/scroll-view/scroll-view-example.cpp
+++ b/examples/scroll-view/scroll-view-example.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -105,7 +105,7 @@ const char* const IMAGE_PATHS[] = {
NULL};
-const char* const GetNextImagePath()
+const char* GetNextImagePath()
{
static const char* const* imagePtr = &IMAGE_PATHS[0];