[LyX/master] Use c++11 to remove last char from a string

Kornel Benko kornel at lyx.org
Sun Apr 19 06:41:18 UTC 2020


commit 478a303f4a68c4ce2aead172ac812230f9d23e23
Author: Kornel Benko <kornel at lyx.org>
Date:   Sun Apr 19 08:59:54 2020 +0200

    Use c++11 to remove last char from a string
    
    Thanks Scott.
---
 src/LyXRC.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index 69072ae..a274c5f 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -672,7 +672,7 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
 			if (lexrc.next()) {
 				string userdir = package().user_support().absFileName();
 				if (userdir.back() == '/')
-				  userdir = userdir.substr(0, userdir.size()-1);
+				  userdir.pop_back();
 				lyxpipes = subst(os::internal_path(lexrc.getString()), "$$UserDir",
 					userdir);
 			}


More information about the lyx-cvs mailing list