From f94d7eff4228a524e3c712a6167aa5d3339776e3 Mon Sep 17 00:00:00 2001 From: Ko van der Sloot Date: Tue, 28 Jan 2025 12:07:45 +0100 Subject: [PATCH] members can be declared 'const' --- include/ucto/tokenize.h | 4 ++-- src/tokenize.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ucto/tokenize.h b/include/ucto/tokenize.h index 27421ae..506120d 100644 --- a/include/ucto/tokenize.h +++ b/include/ucto/tokenize.h @@ -99,8 +99,8 @@ namespace Tokenizer { const UnicodeString&, const std::string& = "" ); std::string lang_code; // ISO 639-3 language code - std::string texttostring(); - std::string typetostring(); + std::string texttostring() const; + std::string typetostring() const ; }; class TokenizerClass{ diff --git a/src/tokenize.cxx b/src/tokenize.cxx index 7a5b0d8..20d6235 100644 --- a/src/tokenize.cxx +++ b/src/tokenize.cxx @@ -167,8 +167,8 @@ namespace Tokenizer { } - std::string Token::texttostring() { return TiCC::UnicodeToUTF8(us); } - std::string Token::typetostring() { return TiCC::UnicodeToUTF8(type); } + std::string Token::texttostring() const { return TiCC::UnicodeToUTF8(us); } + std::string Token::typetostring() const { return TiCC::UnicodeToUTF8(type); } ostream& operator<< (std::ostream& os, const Token& t ){ os << t.type << " : " << t.role << ": '" << t.us << "' (" << t.lang_code << ")";