Remove Tuple::duplicate() 37/124637/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 12 Apr 2017 04:31:21 +0000 (13:31 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 12 Apr 2017 04:31:21 +0000 (13:31 +0900)
Change-Id: Idb954136c518c12a07535044232938e54e835edc
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
include/Tuple.h
src/shared/Tuple.cpp

index 69a90bd..728207f 100644 (file)
@@ -36,8 +36,6 @@ namespace ctx {
                bool getAt(unsigned int idx, std::string* val);
                bool getAt(unsigned int idx, const char** val);
 
-               static std::shared_ptr<Tuple> duplicate(std::shared_ptr<Tuple> tuple);
-
                static GVariant* toGVariant(std::shared_ptr<Tuple> tuple);
                static GVariant* toGVariant(std::vector<std::shared_ptr<Tuple>>& tuples);
 
index 94eea95..9863126 100644 (file)
@@ -131,21 +131,6 @@ bool Tuple::getAt(unsigned int idx, const char** val)
        return true;
 }
 
-shared_ptr<Tuple> Tuple::duplicate(shared_ptr<Tuple> tuple)
-{
-   gchar* printed = g_variant_print(tuple->__gVar, TRUE);
-   GVariant* gv = g_variant_parse(NULL, printed, NULL, NULL, NULL);
-   g_free(printed);
-
-   try {
-          return std::make_shared<Tuple>(gv);
-   } catch (const std::exception& e) {
-          _E("Exception: %s", e.what());
-          g_variant_unref(gv);
-          throw;
-   }
-}
-
 GVariant* Tuple::toGVariant(shared_ptr<Tuple> tuple)
 {
        GVariant* gv = tuple->__gVar;