Skip to content

Commit f94d7ef

Browse files
committed
members can be declared 'const'
1 parent b1ca060 commit f94d7ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/ucto/tokenize.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ namespace Tokenizer {
9999
const UnicodeString&,
100100
const std::string& = "" );
101101
std::string lang_code; // ISO 639-3 language code
102-
std::string texttostring();
103-
std::string typetostring();
102+
std::string texttostring() const;
103+
std::string typetostring() const ;
104104
};
105105

106106
class TokenizerClass{

src/tokenize.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ namespace Tokenizer {
167167
}
168168

169169

170-
std::string Token::texttostring() { return TiCC::UnicodeToUTF8(us); }
171-
std::string Token::typetostring() { return TiCC::UnicodeToUTF8(type); }
170+
std::string Token::texttostring() const { return TiCC::UnicodeToUTF8(us); }
171+
std::string Token::typetostring() const { return TiCC::UnicodeToUTF8(type); }
172172

173173
ostream& operator<< (std::ostream& os, const Token& t ){
174174
os << t.type << " : " << t.role << ": '" << t.us << "' (" << t.lang_code << ")";

0 commit comments

Comments
 (0)