diff options
author | Přemysl Janouch <p@janouch.name> | 2018-11-02 12:35:03 +0100 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-11-02 12:35:03 +0100 |
commit | beee2e2683f7ada21dadfc799c876e5189341c68 (patch) | |
tree | e45efb36841a92dc2941784275a01cec400a7ed0 /sdn.cpp | |
parent | 4ab0db3c0468d0944b87bdf87da5203050db9eb8 (diff) | |
download | sdn-beee2e2683f7ada21dadfc799c876e5189341c68.tar.gz sdn-beee2e2683f7ada21dadfc799c876e5189341c68.tar.xz sdn-beee2e2683f7ada21dadfc799c876e5189341c68.zip |
Unnecessary c_str()
Diffstat (limited to 'sdn.cpp')
-rw-r--r-- | sdn.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -779,8 +779,7 @@ fun search (const wstring &needle) { fun is_ancestor_dir (const string &ancestor, const string &of) -> bool { if (strncmp (ancestor.c_str (), of.c_str (), ancestor.length ())) return false; - return of.c_str ()[ancestor.length ()] == '/' - || (ancestor == "/" && ancestor != of); + return of[ancestor.length ()] == '/' || (ancestor == "/" && ancestor != of); } fun change_dir (const string &path) { |