From c35f7abc5b9c546ab4dc271d4b69479f987eabb7 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 7 Jul 2018 14:27:17 -0500 Subject: [PATCH] [ox/fs] Add fullPath method to PathIterator --- deps/ox/src/ox/fs/filesystem/pathiterator.cpp | 6 ++++-- deps/ox/src/ox/fs/filesystem/pathiterator.hpp | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deps/ox/src/ox/fs/filesystem/pathiterator.cpp b/deps/ox/src/ox/fs/filesystem/pathiterator.cpp index 25b35aab0..24020cfb1 100644 --- a/deps/ox/src/ox/fs/filesystem/pathiterator.cpp +++ b/deps/ox/src/ox/fs/filesystem/pathiterator.cpp @@ -183,10 +183,8 @@ bool PathIterator::valid() const { PathIterator PathIterator::operator+(int i) const { std::size_t size = 0; - Error retval = 1; auto iterator = m_iterator; if (iterator < m_maxSize && ox_strlen(&m_path[iterator])) { - retval = 0; if (m_path[iterator] == '/') { iterator++; } @@ -204,4 +202,8 @@ PathIterator PathIterator::operator+(int i) const { return PathIterator(m_path, m_maxSize, iterator + i); } +const char *PathIterator::fullPath() const { + return m_path; +} + } diff --git a/deps/ox/src/ox/fs/filesystem/pathiterator.hpp b/deps/ox/src/ox/fs/filesystem/pathiterator.hpp index c1359874c..1be28ba7e 100644 --- a/deps/ox/src/ox/fs/filesystem/pathiterator.hpp +++ b/deps/ox/src/ox/fs/filesystem/pathiterator.hpp @@ -67,6 +67,8 @@ class PathIterator { PathIterator operator+(int i) const; + const char *fullPath() const; + }; }