From beee2e2683f7ada21dadfc799c876e5189341c68 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Fri, 2 Nov 2018 12:35:03 +0100 Subject: Unnecessary c_str() --- sdn.cpp | 3 +-- 1 file changed, 1 insertion(+), 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) { -- cgit v1.2.3-70-g09d2