summaryrefslogtreecommitdiff
path: root/src/syncevo/SyncContext.cpp
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2018-01-31 17:28:28 +0100
committerPatrick Ohly <patrick.ohly@intel.com>2020-12-05 21:28:08 +0100
commite88bfa62143bbbf020c234303c941385c7c19014 (patch)
tree618824205cf45bf9c7bf7c3a50b311d6db604256 /src/syncevo/SyncContext.cpp
parent7d527c6dd8d55b0c8a7d001d5ae71627f38b1beb (diff)
C++: automatically determine iterator types
Having to specify the type of an iterator is annoying and does not really add clarity to the code. With C++11 we can use "auto" instead and in some cases remove helper typedefs. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Diffstat (limited to 'src/syncevo/SyncContext.cpp')
-rw-r--r--src/syncevo/SyncContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/syncevo/SyncContext.cpp b/src/syncevo/SyncContext.cpp
index b87bce9d..e35bf9f6 100644
--- a/src/syncevo/SyncContext.cpp
+++ b/src/syncevo/SyncContext.cpp
@@ -554,7 +554,7 @@ public:
}
stringstream path;
path << base.str();
- SeqMap_t::iterator it = dateTimes2Seq.find(path.str());
+ auto it = dateTimes2Seq.find(path.str());
if (it != dateTimes2Seq.end()) {
path << "-" << (char)('a' + it->second + 1);
}
@@ -854,7 +854,7 @@ public:
if (stat(fullpath.c_str(), &buf)) {
Exception::throwError(SE_HERE, fullpath, errno);
}
- set<ino_t>::iterator it = firstInodes.find(buf.st_ino);
+ auto it = firstInodes.find(buf.st_ino);
if (it == firstInodes.end()) {
// second dir has different file
return true;
@@ -2398,7 +2398,7 @@ string XMLFiles::get(Category category)
string XMLFiles::get(const string &file)
{
string res;
- StringMap::const_iterator entry = m_files[MAIN].find(file);
+ auto entry = m_files[MAIN].find(file);
if (entry != m_files[MAIN].end()) {
ReadFile(entry->second, res);
}