[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sptk-commits
Subject:    r671 - trunk/sptk4
From:       alexey () mail ! total-knowledge ! com
Date:       2009-05-18 5:13:25
Message-ID: courier.000000004A10EE75.00007375 () mail ! total-knowledge ! com
[Download RAW message or body]

Author: alexey
Date: 2009-05-17 22:13:25 -0700 (Sun, 17 May 2009)
New Revision: 671

Modified:
   trunk/sptk4/CStrings.h
Log:
Added several push_back methods to minimize conversions

Modified: trunk/sptk4/CStrings.h
===================================================================
--- trunk/sptk4/CStrings.h	2009-05-18 05:12:09 UTC (rev 670)
+++ trunk/sptk4/CStrings.h	2009-05-18 05:13:25 UTC (rev 671)
@@ -154,6 +154,18 @@
         parseString(src,delimiter);
     }
 
+    void push_back(const idstring& s) {
+        std::vector<idstring>::push_back(s);
+    }
+
+    void push_back(const std::string& s) {
+        std::vector<idstring>::push_back(idstring(s));
+    }
+
+    void push_back(const char* s) {
+        std::vector<idstring>::push_back(idstring(s));
+    }
+
     /// @brief Assigns strings from a string with elements separated by a delimiter string
     /// @param src const std::string&, a source string
     /// @param delimiter const char *, a delimiter string

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic