diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-12-03 01:38:22 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-12-03 01:38:22 +0100 |
commit | aff89d2fd7c8653b29adb06d19fcc857f886a866 (patch) | |
tree | 8e1cd01d7af7f81f2d2b9352dd750adc8847b4d3 /AK | |
parent | f31e1ceab06145c8280d21fa3818e6d9cd98e47f (diff) | |
download | serenity-aff89d2fd7c8653b29adb06d19fcc857f886a866.zip |
Yet more coding style fixes.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/FileSystemPath.cpp | 20 | ||||
-rw-r--r-- | AK/FileSystemPath.h | 6 |
2 files changed, 13 insertions, 13 deletions
diff --git a/AK/FileSystemPath.cpp b/AK/FileSystemPath.cpp index ba907e4c79..e30df5d589 100644 --- a/AK/FileSystemPath.cpp +++ b/AK/FileSystemPath.cpp @@ -8,35 +8,35 @@ namespace AK { FileSystemPath::FileSystemPath(const String& s) : m_string(s) { - m_isValid = canonicalize(); + m_is_valid = canonicalize(); } -bool FileSystemPath::canonicalize(bool resolveSymbolicLinks) +bool FileSystemPath::canonicalize(bool resolve_symbolic_links) { // FIXME: Implement "resolveSymbolicLinks" - (void) resolveSymbolicLinks; + (void) resolve_symbolic_links; auto parts = m_string.split('/'); - Vector<String> canonicalParts; + Vector<String> canonical_parts; for (auto& part : parts) { if (part == ".") continue; if (part == "..") { - if (!canonicalParts.isEmpty()) - canonicalParts.takeLast(); + if (!canonical_parts.isEmpty()) + canonical_parts.takeLast(); continue; } if (!part.isEmpty()) - canonicalParts.append(part); + canonical_parts.append(part); } - if (canonicalParts.isEmpty()) { + if (canonical_parts.isEmpty()) { m_string = m_basename = "/"; return true; } - m_basename = canonicalParts.last(); + m_basename = canonical_parts.last(); StringBuilder builder; - for (auto& cpart : canonicalParts) { + for (auto& cpart : canonical_parts) { builder.append('/'); builder.append(move(cpart)); } diff --git a/AK/FileSystemPath.h b/AK/FileSystemPath.h index 7a3623d0cc..980f836226 100644 --- a/AK/FileSystemPath.h +++ b/AK/FileSystemPath.h @@ -9,17 +9,17 @@ public: FileSystemPath() { } explicit FileSystemPath(const String&); - bool isValid() const { return m_isValid; } + bool is_valid() const { return m_is_valid; } String string() const { return m_string; } String basename() const { return m_basename; } private: - bool canonicalize(bool resolveSymbolicLinks = false); + bool canonicalize(bool resolve_symbolic_links = false); String m_string; String m_basename; - bool m_isValid { false }; + bool m_is_valid { false }; }; }; |