summaryrefslogtreecommitdiff
path: root/libs/ardour/lv2_plugin.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-06-01 19:19:09 +0200
committerRobin Gareus <robin@gareus.org>2016-06-01 19:19:09 +0200
commiteeed8edf829941e13d74adcd287e393f39b22ef8 (patch)
tree503c6ebe99ae9ec7492c7ed88a355ace8f22086b /libs/ardour/lv2_plugin.cc
parent10a91850f2a8663e8825166f7ee3c326c1c63abd (diff)
isspace
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r--libs/ardour/lv2_plugin.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 5b97b68333..9e253a359f 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -17,6 +17,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <cctype>
#include <string>
#include <vector>
#include <limits>
@@ -238,11 +239,7 @@ log_vprintf(LV2_Log_Handle /*handle*/,
char* str = NULL;
const int ret = g_vasprintf(&str, fmt, args);
/* strip trailing whitespace */
- while (strlen (str) > 0
- && ( str[strlen (str) - 1] == '\n'
- || str[strlen (str) - 1] == '\r'
- || str[strlen (str) - 1] == ' '
- || str[strlen (str) - 1] == '\t')) {
+ while (strlen (str) > 0 && isspace (str[strlen (str) - 1])) {
str[strlen (str) - 1] = '\0';
}
if (strlen (str) == 0) {