fix(cmake): Make specific c++lib linking optional

- Do not enforce linking against libc++
- Fix various linter warnings
This commit is contained in:
Michael Carlberg
2016-10-25 20:14:44 +02:00
parent 27df2398f0
commit eac65cdabb
11 changed files with 55 additions and 42 deletions

View File

@ -120,7 +120,7 @@ namespace inotify_util {
inline auto make_watch(string path) {
di::injector<inotify_watch_t> injector = di::make_injector(di::bind<>().to(path));
return injector.create<inotify_watch_t>();
};
}
}
LEMONBUDDY_NS_END

View File

@ -35,7 +35,7 @@ namespace scope_util {
template <typename Fn = function<void()>, typename... Args>
decltype(auto) make_exit_handler(Fn&& fn, Args&&... args) {
return make_unique<on_exit<Args...>>(forward<Fn>(fn), forward<Args>(args)...);
};
}
}
LEMONBUDDY_NS_END

View File

@ -59,7 +59,7 @@ namespace string_util {
for (size_t i = 0; i < haystack.length(); i++) {
if (haystack.compare(i, needle.length(), needle) == 0) {
replaced += replacement;
i += needle.length()-1;
i += needle.length() - 1;
} else {
replaced += haystack[i];
}