Skip to content

Commit

Permalink
Merge pull request #19 from valeriyvan/deprecate
Browse files Browse the repository at this point in the history
Solves deprecation warning of using ptr_fun<int, int>
  • Loading branch information
craigsapp authored Nov 21, 2019
2 parents 7c6043a + 213ac49 commit 73ad86e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/humlib.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Programmer: Craig Stuart Sapp <[email protected]>
// Creation Date: Sat Aug 8 12:24:49 PDT 2015
// Last Modified: Fri Nov 15 12:54:06 WET 2019
// Last Modified: Thu Nov 21 14:49:55 CET 2019
// Filename: humlib.h
// URL: https://github.com/craigsapp/humlib/blob/master/include/humlib.h
// Syntax: C++11
Expand Down
4 changes: 2 additions & 2 deletions src/Convert-string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ string Convert::getHumNumAttributes(const HumNum& num) {
string Convert::trimWhiteSpace(const string& input) {
string s = input;
s.erase(s.begin(), std::find_if(s.begin(), s.end(),
std::not1(std::ptr_fun<int, int>(isspace))));
[](int c) {return !std::isspace(c);}));
s.erase(std::find_if(s.rbegin(), s.rend(),
std::not1(std::ptr_fun<int, int>(isspace))).base(), s.end());
[](int c) {return !std::isspace(c);}).base(), s.end());
return s;
}

Expand Down
6 changes: 3 additions & 3 deletions src/humlib.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Programmer: Craig Stuart Sapp <[email protected]>
// Creation Date: Sat Aug 8 12:24:49 PDT 2015
// Last Modified: Fri Nov 15 12:54:06 WET 2019
// Last Modified: Thu Nov 21 14:49:55 CET 2019
// Filename: /include/humlib.cpp
// URL: https://github.com/craigsapp/humlib/blob/master/src/humlib.cpp
// Syntax: C++11
Expand Down Expand Up @@ -3237,9 +3237,9 @@ string Convert::getHumNumAttributes(const HumNum& num) {
string Convert::trimWhiteSpace(const string& input) {
string s = input;
s.erase(s.begin(), std::find_if(s.begin(), s.end(),
std::not1(std::ptr_fun<int, int>(isspace))));
[](int c) {return !std::isspace(c);}));
s.erase(std::find_if(s.rbegin(), s.rend(),
std::not1(std::ptr_fun<int, int>(isspace))).base(), s.end());
[](int c) {return !std::isspace(c);}).base(), s.end());
return s;
}

Expand Down

0 comments on commit 73ad86e

Please sign in to comment.