mirror of
https://github.com/status-im/macdylibbundler.git
synced 2025-02-21 07:08:25 +00:00
use C++11
This commit is contained in:
parent
da161cb9eb
commit
3c2c2d605a
3
Makefile
3
Makefile
@ -1,6 +1,7 @@
|
|||||||
DESTDIR=
|
DESTDIR=
|
||||||
PREFIX=/usr/local
|
PREFIX=/usr/local
|
||||||
CXXFLAGS = -O2
|
CXX=clang++
|
||||||
|
CXXFLAGS=-O2 -std=c++11
|
||||||
|
|
||||||
all: dylibbundler
|
all: dylibbundler
|
||||||
|
|
||||||
|
@ -44,8 +44,20 @@ std::string stripPrefix(std::string in)
|
|||||||
return in.substr(in.rfind("/")+1);
|
return in.substr(in.rfind("/")+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string& rtrim(std::string &s) {
|
// 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());
|
// 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;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user