mirror of
https://github.com/status-im/macdylibbundler.git
synced 2025-02-19 14:24:12 +00:00
use C++11
This commit is contained in:
parent
da161cb9eb
commit
3c2c2d605a
3
Makefile
3
Makefile
@ -1,6 +1,7 @@
|
||||
DESTDIR=
|
||||
PREFIX=/usr/local
|
||||
CXXFLAGS = -O2
|
||||
CXX=clang++
|
||||
CXXFLAGS=-O2 -std=c++11
|
||||
|
||||
all: dylibbundler
|
||||
|
||||
|
@ -44,8 +44,20 @@ std::string stripPrefix(std::string in)
|
||||
return in.substr(in.rfind("/")+1);
|
||||
}
|
||||
|
||||
std::string& rtrim(std::string &s) {
|
||||
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
|
||||
// std::string& rtrim(std::string &s) {
|
||||
// s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
|
||||
// return s;
|
||||
// }
|
||||
|
||||
static inline void rtrim_in_place(std::string &s) {
|
||||
s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) {
|
||||
return !std::isspace(ch);
|
||||
}).base(), s.end());
|
||||
}
|
||||
|
||||
// trim from end (copying)
|
||||
static inline std::string rtrim(std::string s) {
|
||||
rtrim_in_place(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user