Spotted by Coverity scan.
void Trans::addDeadkey(tex_accent accent, docstring const & keys)
{
- KmodInfo tmp;
- tmp.data = keys;
- tmp.accent = accent;
- kmod_list_[accent] = tmp;
+ kmod_list_[accent] = KmodInfo(keys, accent, KmodException());
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_[key] = tmpd;
+ keymap_[key] = docstring() + char_type(0) + char_type(accent);
}
}
///
KmodInfo() : accent(TEX_NOACCENT) {}
///
+ KmodInfo(docstring const & d, tex_accent a, KmodException const & e)
+ : data(d), accent(a), exception_list(e) {}
+ ///
docstring data;
///
tex_accent accent;