[glom] Small use of auto.



commit a207016120ff6a284eb179b6392fb094d64efe1d
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 15 08:41:38 2016 +0100

    Small use of auto.

 glom/python_embed/glom_python.cc |    2 +-
 glom/test_pyembed.cc             |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glom/python_embed/glom_python.cc b/glom/python_embed/glom_python.cc
index 2ce8994..23ebd97 100644
--- a/glom/python_embed/glom_python.cc
+++ b/glom/python_embed/glom_python.cc
@@ -54,7 +54,7 @@ static std::list<Glib::ustring> ustring_tokenize(const Glib::ustring& msg, const
 
   while(str.find(separators) != Glib::ustring::npos && (nocount? true : count!=maxParts))
   {
-    unsigned int pos = str.find(separators);
+    auto pos = str.find(separators);
     Glib::ustring tmp = str.substr(0, pos);
     str = str.erase(0, pos + separators.size());
     result.emplace_back(tmp);
diff --git a/glom/test_pyembed.cc b/glom/test_pyembed.cc
index 0a2b90b..a61dffd 100644
--- a/glom/test_pyembed.cc
+++ b/glom/test_pyembed.cc
@@ -16,9 +16,9 @@ std::list<Glib::ustring> ustring_tokenize(const Glib::ustring& msg, const Glib::
 
   while(str.find(separators) != Glib::ustring::npos && (nocount? true : count!=maxParts))
   {
-    unsigned int pos = str.find(separators);
-    Glib::ustring tmp = str.substr(0,pos);
-    str=str.erase(0, pos+separators.size());
+    auto pos = str.find(separators);
+    Glib::ustring tmp = str.substr(0, pos);
+    str=str.erase(0, pos + separators.size());
     result.emplace_back(tmp);
     count++;
   }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]