iOS: fix app id in path, pen pressure filtering on Line

This commit is contained in:
2019-03-11 11:40:17 +01:00
parent 5cd80f41fa
commit 373e7ad0e9
6 changed files with 48 additions and 13 deletions

View File

@@ -508,6 +508,22 @@ bool str_iequals(const std::string& a, const std::string& b)
return true;
}
std::string str_replace(const std::string& string, const std::string& search, const std::string& replace)
{
std::string ret = string;
// Get the first occurrence
size_t pos = ret.find(search);
// Repeat till end is reached
while(pos != std::string::npos)
{
// Replace this occurrence of Sub String
ret.replace(pos, search.size(), replace);
// Get the next occurrence from the current position
pos = ret.find(search, pos + replace.size());
}
return ret;
}
static const char* gl2str(GLenum err)
{
switch (err)
@@ -611,4 +627,4 @@ void parallel_for(unsigned nb_elements, std::function<void(int i)> functor, bool
// Wait for the other thread to finish their task
if (use_threads)
std::for_each(my_threads.begin(), my_threads.end(), std::mem_fn(&std::thread::join));
}
}