Static code analysis 49/157149/2
authorLukasz Wlazly <l.wlazly@partner.samsung.com>
Mon, 23 Oct 2017 12:36:34 +0000 (14:36 +0200)
committerLukasz Wlazly <l.wlazly@partner.samsung.com>
Mon, 23 Oct 2017 12:57:31 +0000 (14:57 +0200)
Change-Id: I062963ce901c7dc9940241008930980cf26f4c24

src/NavigationInterface.cpp
src/SwitchId.cpp
src/SwitchId.hpp
src/SwitchInteractionManager.cpp
src/SwitchInteractionManager.hpp
tests/no-ui-scenarios/DBusTests.cpp

index fe8b8624f2fd003f054895554969a6c0abfe1472..530fd3e30a9afe985ebbf0d6c5f73da31b601c8a 100644 (file)
@@ -443,7 +443,7 @@ private:
                struct Elem {
                        AtspiAccessiblePtr obj, parent;
                        Rectangle pos;
-                       bool hasRelation = false, isItem = false, isCollapsed = false, isDisabled = false;
+                       bool hasRelation = false, isItem = false, isCollapsed = false;
                };
                struct All {
                        std::vector<AtspiAccessiblePtr> expandableElems, expandableAndExpandedElems;
index cfcce3ca38d4857158b4a952b0082681a4699dc7..4ed47e21d5fc67153063e8164de2aad6956917dc 100644 (file)
@@ -1,6 +1,6 @@
 #include "SwitchId.hpp"
 
-SwitchId::SwitchId(const std::string &localId, const std::string providerId)
+SwitchId::SwitchId(const std::string &localId, const std::string &providerId)
        : localId(localId), providerId(providerId)
 {}
 
@@ -14,11 +14,6 @@ std::string SwitchId::getGlobalId() const
        return providerId + "_" + localId;
 }
 
-std::string SwitchId::getLocalId() const
-{
-       return localId;
-}
-
 std::string SwitchId::getProviderId() const
 {
        return providerId;
index c5ae5dd2d71c1fa10da0ed8f8c4a6988c93d8368..df4305953d379ede439b27037c649189b474bc68 100644 (file)
@@ -6,12 +6,11 @@
 class SwitchId
 {
 public:
-       SwitchId(const std::string &localId, const std::string providerId);
+       SwitchId(const std::string &localId, const std::string &providerId);
 
        bool operator==(const SwitchId &switchId) const;
 
        std::string getGlobalId() const;
-       std::string getLocalId() const;
        std::string getProviderId() const;
 
 private:
index abb4d8525d5dfbda91401757d6688eb820af12a4..1031d2f148d6c27294d4481a00de92ffe7243fd0 100644 (file)
@@ -46,21 +46,6 @@ void SwitchInteractionManager::stopInteraction(const std::shared_ptr<Switch> &sw
        });
 }
 
-double SwitchInteractionManager::getMinimalSwitchInteractionTime() const
-{
-       return minimalSwitchInteractionTime;
-}
-
-double SwitchInteractionManager::getSwitchInteractionInterval() const
-{
-       return switchInteractionInterval;
-}
-
-double SwitchInteractionManager::getNotificationRepetitionInterval() const
-{
-       return notificationRepetitionInterval;
-}
-
 void SwitchInteractionManager::registerAndGetStateAndValueVconfData(VConfInterface::CallbackHandle &stateHandler, const std::string &stateKey,
                VConfInterface::CallbackHandle &valueHandler, const std::string &valueKey, double &value)
 {
index 00c64282f42e176c8127f3f1ac4bd3793783ad33..d3fa83465e57c483e08d8e5d4ae4fe40513bfa95 100644 (file)
@@ -17,10 +17,6 @@ public:
        void startInteraction(const NotifyMethod &method, const std::shared_ptr<Switch> &sw);
        void stopInteraction(const std::shared_ptr<Switch> &sw);
 
-       double getMinimalSwitchInteractionTime() const;
-       double getSwitchInteractionInterval() const;
-       double getNotificationRepetitionInterval() const;
-
 private:
        ecore::TimerRepetitionPolicy unconditionallyStopInteraction();
 
index d9e41b9be55a8f10eb3a33fb75ea4ea5511e8792..e6b07bebf6b9ee87fbbb53d34c793b64f786a84c 100644 (file)
@@ -81,29 +81,6 @@ protected:
                ecore_main_loop_begin();
        }
 
-       static void addValues(std::map<int, int> &dst, std::map<int, int> &s1, std::map<int, int> &s2)
-       {
-               for (auto &a : s1)
-                       dst[a.first] = a.second + s2[a.first];
-       }
-       static void addValues(std::unordered_map<int, int> &dst, std::unordered_map<int, int> &s1, std::unordered_map<int, int> &s2)
-       {
-               for (auto &a : s1)
-                       dst[a.first] = a.second + s2[a.first];
-       }
-       static void addValues(std::vector<int> &dst, std::vector<int> &s1, std::vector<int> &s2)
-       {
-               dst.resize(s1.size());
-               for (size_t i = 0; i < s1.size(); ++i) {
-                       dst[i] = s1[i] + s2[i];
-               }
-       }
-       template <size_t I> static void addValues(std::array<int, I> &dst, std::array<int, I> &s1, std::array<int, I> &s2)
-       {
-               for (size_t i = 0; i < I; ++i) {
-                       dst[i] = s1[i] + s2[i];
-               }
-       }
        template <typename T1, typename T2> static void compareValues(T1 src, T2 expected)
        {
                EXPECT_EQ(src.size(), expected.size());
@@ -486,7 +463,6 @@ TEST_F(DBusTest, sendAndReceiveSignal)
 {
        auto connection = getDBusConnectionByType(DBus::ConnectionType::SYSTEM);
        DBus::DBusInterfaceDescription dsc("itest.itest");
-       std::unordered_map<std::string, int> values;
 
        auto signalId = dsc.addSignal<int, int>("ftest");
        DBus::DBusServer server{connection};