summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-12-20 11:54:51 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-12-20 12:28:27 +0000
commit2732dc828ec20232672d6a9ea55f25ba9b0490b2 (patch)
tree8228ea7cb6793a5bb5e147352fbff42ea04e7b65
parentMove strings instead of copying them (diff)
downloadlibjsonpp-2732dc828ec20232672d6a9ea55f25ba9b0490b2.tar.bz2
libjsonpp-2732dc828ec20232672d6a9ea55f25ba9b0490b2.tar.xz
libjsonpp-2732dc828ec20232672d6a9ea55f25ba9b0490b2.zip
Encoding should be const
-rw-r--r--libjsonpp/jsonFlexLexer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libjsonpp/jsonFlexLexer.h b/libjsonpp/jsonFlexLexer.h
index b5ad9a3..eeefaba 100644
--- a/libjsonpp/jsonFlexLexer.h
+++ b/libjsonpp/jsonFlexLexer.h
@@ -30,7 +30,8 @@ namespace json {
private:
std::string encodeBuf() const;
- std::string buf, name, encoding;
+ std::string buf, name;
+ const std::string encoding;
using AcceptValue = std::function<Value *(Value &&)>;
std::stack<AcceptValue> acceptValues;