Browse Source

Fixing compiler errors because the directory organization was changed

Sam Jaffe 5 years ago
parent
commit
e1a23ed0c0
3 changed files with 7 additions and 5 deletions
  1. 2 0
      cli.xcodeproj/project.pbxproj
  2. 1 0
      include/cli/cli.h
  3. 4 5
      src/cli.cxx

+ 2 - 0
cli.xcodeproj/project.pbxproj

@@ -345,6 +345,7 @@
 				MTL_FAST_MATH = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = include;
 			};
 			name = Debug;
 		};
@@ -396,6 +397,7 @@
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_FAST_MATH = YES;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = include;
 			};
 			name = Release;
 		};

+ 1 - 0
include/cli/cli.h

@@ -11,6 +11,7 @@
 #include <functional>
 #include <string>
 #include <string_view>
+#include <tuple>
 #include <unordered_map>
 #include <vector>
 

+ 4 - 5
src/cli.cxx

@@ -6,19 +6,18 @@
 //  Copyright © 2020 Sam Jaffe. All rights reserved.
 //
 
-#include "cli.h"
+#include "cli/cli.h"
 
 #include <iostream>
 
 namespace {
 
-cli::args_t tokenize(std::string const & search, std::string const & token,
-                     bool ignore_empty = false) {
-  cli::args_t rval;
+auto tokenize(std::string const & search, std::string const & token) {
+  cli::cli::args_t rval;
   size_t i = 0;
   for (size_t n = search.find(token); n != std::string::npos;
        i = n + 1, n = search.find(token, i)) {
-    if (i == n && ignore_empty) continue;
+    if (i == n) continue;
     rval.emplace_back(&search[i], n - i);
   }
   rval.emplace_back(&search[i], search.size() - i);