mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 04:42:36 -03:00
util: Enhance bilingual_str
This commit is contained in:
parent
376294cde6
commit
fe05dd0611
1 changed files with 10 additions and 4 deletions
|
@ -16,13 +16,19 @@
|
|||
struct bilingual_str {
|
||||
std::string original;
|
||||
std::string translated;
|
||||
|
||||
bilingual_str& operator+=(const bilingual_str& rhs)
|
||||
{
|
||||
original += rhs.original;
|
||||
translated += rhs.translated;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
inline bilingual_str operator+(const bilingual_str& lhs, const bilingual_str& rhs)
|
||||
inline bilingual_str operator+(bilingual_str lhs, const bilingual_str& rhs)
|
||||
{
|
||||
return bilingual_str{
|
||||
lhs.original + rhs.original,
|
||||
lhs.translated + rhs.translated};
|
||||
lhs += rhs;
|
||||
return lhs;
|
||||
}
|
||||
|
||||
/** Mark a bilingual_str as untranslated */
|
||||
|
|
Loading…
Reference in a new issue