#include "Trans.h"
-#include "Buffer.h"
-#include "BufferView.h"
-#include "Cursor.h"
-#include "CutAndPaste.h"
#include "Lexer.h"
-#include "LyXRC.h"
#include "Text.h"
#include "support/debug.h"
tmp.accent = accent;
kmod_list_[accent] = tmp;
- for (docstring::size_type i = 0; i < keys.length(); ++i) {
+ for (char_type key : keys) {
// FIXME This is a hack.
// tmp is no valid UCS4 string, but misused to store the
// accent.
docstring tmpd;
tmpd += char_type(0);
tmpd += char_type(accent);
- keymap_[keys[i]] = tmpd;
+ keymap_[key] = tmpd;
}
}
int Trans::load(Lexer & lex)
{
- bool error = false;
-
- while (lex.isOK() && !error) {
+ while (lex.isOK()) {
switch (lex.lex()) {
case KMOD:
{
KmodException::const_iterator cit = deadkey_info_.exception_list.begin();
KmodException::const_iterator end = deadkey_info_.exception_list.end();
for (; cit != end; ++cit) {
- if (cit->combined == true && cit->accent == d.accent) {
+ if (cit->combined && cit->accent == d.accent) {
deadkey2_ = c;
deadkey2_info_ = d;
comb_info_ = (*cit);
// A deadkey was pressed that cannot be printed
// or a accent command was typed in the minibuffer
KmodInfo i;
- if (active_->isAccentDefined(accent, i) == true) {
+ if (active_->isAccentDefined(accent, i)) {
docstring const res = trans_fsm_
.currentState->deadkey(c, i);
insert(res, t, cur);