Skip to content

Commit

Permalink
members can be declared 'const'
Browse files Browse the repository at this point in the history
  • Loading branch information
kosloot committed Jan 28, 2025
1 parent b1ca060 commit f94d7ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/ucto/tokenize.h
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions src/tokenize.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 << ")";
Expand Down

0 comments on commit f94d7ef

Please sign in to comment.