TransState::addkey() pass parameter by const reference

Spotted by Coverity scan.
This commit is contained in:
Jean-Marc Lasgouttes 2024-09-12 16:54:02 +02:00
parent eeb84bce17
commit 7946dfacfa
2 changed files with 8 additions and 8 deletions

View File

@ -451,7 +451,7 @@ docstring const TransInitState::normalkey(char_type c)
}
docstring const TransInitState::deadkey(char_type c, KmodInfo d)
docstring const TransInitState::deadkey(char_type c, KmodInfo const & d)
{
deadkey_ = c;
deadkey_info_ = d;
@ -488,7 +488,7 @@ docstring const TransDeadkeyState::normalkey(char_type c)
}
docstring const TransDeadkeyState::deadkey(char_type c, KmodInfo d)
docstring const TransDeadkeyState::deadkey(char_type c, KmodInfo const & d)
{
docstring res;
@ -548,7 +548,7 @@ docstring const TransCombinedState::normalkey(char_type c)
}
docstring const TransCombinedState::deadkey(char_type c, KmodInfo d)
docstring const TransCombinedState::deadkey(char_type c, KmodInfo const & d)
{
// Third key in a row. Output the first one and
// reenter with shifted deadkeys

View File

@ -197,7 +197,7 @@ public:
///
virtual bool backspace() = 0;
///
virtual docstring const deadkey(char_type, KmodInfo) = 0;
virtual docstring const deadkey(char_type, KmodInfo const &) = 0;
///
static char_type const TOKEN_SEP;
};
@ -243,7 +243,7 @@ public:
///
bool backspace() override { return true; }
///
docstring const deadkey(char_type, KmodInfo) override;
docstring const deadkey(char_type, KmodInfo const &) override;
};
@ -260,7 +260,7 @@ public:
return false;
}
///
docstring const deadkey(char_type, KmodInfo) override;
docstring const deadkey(char_type, KmodInfo const &) override;
};
@ -281,7 +281,7 @@ public:
return false;
}
///
docstring const deadkey(char_type, KmodInfo) override;
docstring const deadkey(char_type, KmodInfo const &) override;
};
@ -335,7 +335,7 @@ public:
///
void translateAndInsert(char_type, Text *, Cursor &);
///
docstring const deadkey(char_type c, KmodInfo t)
docstring const deadkey(char_type c, KmodInfo const & t)
{ return trans_fsm_.currentState->deadkey(c, t); }
///
docstring const normalkey(char_type c)