lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [12/20] git commit: refs/heads/cfish-string-prep1 - Eliminate SStr_Nibble in Store::FSFolder
Date Sat, 07 Sep 2013 16:53:33 GMT
Eliminate SStr_Nibble in Store::FSFolder


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/a0efa07b
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/a0efa07b
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/a0efa07b

Branch: refs/heads/cfish-string-prep1
Commit: a0efa07b6ae32c66161e212155f37459cd1fe747
Parents: fd388fc
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sat Sep 7 15:27:29 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sat Sep 7 18:14:05 2013 +0200

----------------------------------------------------------------------
 core/Lucy/Store/FSFolder.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/a0efa07b/core/Lucy/Store/FSFolder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFolder.c b/core/Lucy/Store/FSFolder.c
index f7d777f..e923d33 100644
--- a/core/Lucy/Store/FSFolder.c
+++ b/core/Lucy/Store/FSFolder.c
@@ -297,12 +297,7 @@ S_create_dir(const String *path) {
 
 static bool
 S_is_local_entry(const String *path) {
-    StackString *scratch = SSTR_WRAP(path);
-    uint32_t code_point;
-    while (0 != (code_point = SStr_Nibble(scratch))) {
-        if (code_point == '/') { return false; }
-    }
-    return true;
+    return Str_Find_Str(path, "/", 1) == -1;
 }
 
 /***************************************************************************/


Mime
View raw message