mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
TransState::addkey() pass parameter by const reference
Spotted by Coverity scan.
This commit is contained in:
parent
eeb84bce17
commit
7946dfacfa
@ -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
|
||||
|
10
src/Trans.h
10
src/Trans.h
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user