diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-05 11:09:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-06 21:19:20 +0300 |
commit | f25f7c803020b9341e49e898abe94917c3235515 (patch) | |
tree | 17754b6b7f4d4037ba4cadb2a55657952c1aeb79 /intern/cycles/util/util_string.h | |
parent | 7623d3e071e6356ce4519073b1a29d984ba86cd9 (diff) |
Cycles: Re-implement some utilities to avoid use of boost
The title says it all actually, the idea is to make Cycles
only requiring Boost via 3rd party dependencies like OIIO
and OSL.
So now there are only few places which still uses Boost:
- Foreach, function bindings and threading primitives.
Those we can easily get rid with C++11 bump (which seems
inevitable sooner or later if we'll want ot use newer
LLVM for OSL),
- Networking devices
There's no quick solution for those currently, but there
are some patches around which improves serialization.
Reviewers: juicyfruit, mont29, campbellbarton, brecht, dingto
Reviewed By: brecht, dingto
Differential Revision: https://developer.blender.org/D1764
Diffstat (limited to 'intern/cycles/util/util_string.h')
-rw-r--r-- | intern/cycles/util/util_string.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/cycles/util/util_string.h b/intern/cycles/util/util_string.h index b863368ab22..d73ab15d784 100644 --- a/intern/cycles/util/util_string.h +++ b/intern/cycles/util/util_string.h @@ -41,11 +41,22 @@ string string_printf(const char *format, ...) PRINTF_ATTRIBUTE; bool string_iequals(const string& a, const string& b); void string_split(vector<string>& tokens, const string& str, const string& separators = "\t "); void string_replace(string& haystack, const string& needle, const string& other); +bool string_startswith(const string& s, const char *start); bool string_endswith(const string& s, const char *end); string string_strip(const string& s); string string_remove_trademark(const string& s); string string_from_bool(const bool var); +/* Wide char strings are only used on Windows to deal with non-ascii + * characters in file names and such. No reason to use such strings + * for something else at this moment. + */ +#ifdef _WIN32 +using std::wstring; +wstring string_to_wstring(const string& path); +string string_from_wstring(const wstring& path); +#endif + CCL_NAMESPACE_END #endif /* __UTIL_STRING_H__ */ |