From beee2e2683f7ada21dadfc799c876e5189341c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Fri, 2 Nov 2018 12:35:03 +0100 Subject: Unnecessary c_str() --- sdn.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sdn.cpp') 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