Fix a couple of compilation warnings

This commit is contained in:
Jean-Marc Lasgouttes 2014-01-28 12:08:35 +01:00
parent a01c0e495f
commit 75bab51a8a
3 changed files with 3 additions and 23 deletions

View File

@ -274,9 +274,9 @@ bool Lexer::Pimpl::setFile(FileName const & filename)
// Skip byte order mark.
if (is.peek() == 0xef) {
int c = is.get();
is.get();
if (is.peek() == 0xbb) {
c = is.get();
is.get();
LASSERT(is.get() == 0xbf, /**/);
} else
is.unget();

View File

@ -559,27 +559,6 @@ string apply_escapes(string s, Escapes const & escape_map)
return s;
}
/** Return the position of the closing brace matching the open one at s[pos],
** or s.size() if not found.
**/
static size_t find_matching_brace(string const & s, size_t pos)
{
LASSERT(s[pos] == '{', /* */);
int open_braces = 1;
for (++pos; pos < s.size(); ++pos) {
if (s[pos] == '\\')
++pos;
else if (s[pos] == '{')
++open_braces;
else if (s[pos] == '}') {
--open_braces;
if (open_braces == 0)
return pos;
}
}
return s.size();
}
/// Within \regexp{} apply get_lyx_unescapes() only (i.e., preserve regexp semantics of the string),
/// while outside apply get_lyx_unescapes()+get_regexp_escapes().
/// If match_latex is true, then apply regexp_latex_escapes() to \regexp{} contents as well.

View File

@ -81,3 +81,4 @@ What's new
- improve detection of Qt via pkg-config, especially on Mac OS.
- fix a couple of compilation warnings.