aboutsummaryrefslogtreecommitdiff
path: root/sdn.cpp
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-11-02 12:35:03 +0100
committerPřemysl Janouch <p@janouch.name>2018-11-02 12:35:03 +0100
commitbeee2e2683f7ada21dadfc799c876e5189341c68 (patch)
treee45efb36841a92dc2941784275a01cec400a7ed0 /sdn.cpp
parent4ab0db3c0468d0944b87bdf87da5203050db9eb8 (diff)
downloadsdn-beee2e2683f7ada21dadfc799c876e5189341c68.tar.gz
sdn-beee2e2683f7ada21dadfc799c876e5189341c68.tar.xz
sdn-beee2e2683f7ada21dadfc799c876e5189341c68.zip
Unnecessary c_str()
Diffstat (limited to 'sdn.cpp')
-rw-r--r--sdn.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/sdn.cpp b/sdn.cpp
index 13e2f0e..b56d458 100644
--- a/sdn.cpp
+++ b/sdn.cpp
@@ -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) {