X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FIndicesList.cpp;h=52fbbde51e6f0eda0b2a2239b39c11fa5ad09d46;hb=c293be56bd12c5dc46e5cedd2828e33918fccef7;hp=9f22373f3ab906f55af1b731fc27842bad8d8b13;hpb=a89dbd75e652f71b4035e0f00fd52c34e5929305;p=lyx.git diff --git a/src/IndicesList.cpp b/src/IndicesList.cpp index 9f22373f3a..52fbbde51e 100644 --- a/src/IndicesList.cpp +++ b/src/IndicesList.cpp @@ -30,7 +30,9 @@ namespace { class IndexNamesEqual : public std::unary_function { public: - IndexNamesEqual(docstring const & name) : name_(name) {} + IndexNamesEqual(docstring const & name) + : name_(name) + {} bool operator()(Index const & index) const { @@ -44,7 +46,9 @@ private: class IndexHasShortcut : public std::unary_function { public: - IndexHasShortcut(docstring const & shortcut) : shortc_(shortcut) {} + IndexHasShortcut(docstring const & shortcut) + : shortc_(shortcut) + {} bool operator()(Index const & index) const { @@ -54,7 +58,7 @@ private: docstring shortc_; }; -} +} // namespace ///////////////////////////////////////////////////////////////////// @@ -186,11 +190,11 @@ bool IndicesList::add(docstring const & n, docstring const & s) docstring sc = s.empty() ? trim(lowercase(name.substr(0, 3))) : s; if (findShortcut(sc) != 0) { - int i = 1; - docstring scn = sc + convert(i); + int k = 1; + docstring scn = sc + convert(k); while (findShortcut(scn) != 0) { - ++i; - scn = sc + convert(i); + ++k; + scn = sc + convert(k); } in.setShortcut(scn); } else