Fix #10868 compiler warnings.

This commit is contained in:
Richard Heck 2017-12-15 23:59:19 -05:00
parent 08010eba51
commit 63d96191b1

View File

@ -908,9 +908,9 @@ void GuiCitation::setCitedKeys()
} }
bool GuiCitation::initialiseParams(string const & data) bool GuiCitation::initialiseParams(string const & sdata)
{ {
InsetCommand::string2params(data, params_); InsetCommand::string2params(sdata, params_);
citeCmds_ = documentBuffer().params().citeCommands(); citeCmds_ = documentBuffer().params().citeCommands();
citeStyles_ = documentBuffer().params().citeStyles(); citeStyles_ = documentBuffer().params().citeStyles();
init(); init();
@ -1010,19 +1010,19 @@ vector<docstring> GuiCitation::searchKeys(BiblioInfo const & bi,
continue; continue;
BibTeXInfo const & kvm = info->second; BibTeXInfo const & kvm = info->second;
string data; string sdata;
if (only_keys) if (only_keys)
data = to_utf8(*it); sdata = to_utf8(*it);
else if (field.empty()) else if (field.empty())
data = to_utf8(*it) + ' ' + to_utf8(kvm.allData()); sdata = to_utf8(*it) + ' ' + to_utf8(kvm.allData());
else else
data = to_utf8(kvm[field]); sdata = to_utf8(kvm[field]);
if (data.empty()) if (sdata.empty())
continue; continue;
try { try {
if (lyx::regex_search(data, reg_exp)) if (lyx::regex_search(sdata, reg_exp))
foundKeys.push_back(*it); foundKeys.push_back(*it);
} }
catch (lyx::regex_error const & e) { catch (lyx::regex_error const & e) {