commit 4b52a9cf46411fc450d809f720564ce5d4521d90
parent f9b79a65932011c0a6a9bec4ef78c2073943ef8e
Author: cfillion <cfillion@users.noreply.github.com>
Date: Fri, 2 Jun 2017 18:05:31 -0400
path: slight refactoring (use std::advance)
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/path.cpp b/src/path.cpp
@@ -239,9 +239,7 @@ const Path &Path::operator+=(const Path &o)
const string &Path::at(const size_t index) const
{
auto it = m_parts.begin();
-
- for(size_t i = 0; i < index; i++)
- it++;
+ advance(it, index);
return *it;
}