mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix a couple of compilation warnings
This commit is contained in:
parent
a01c0e495f
commit
75bab51a8a
@ -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();
|
||||
|
@ -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.
|
||||
|
@ -81,3 +81,4 @@ What's new
|
||||
|
||||
- improve detection of Qt via pkg-config, especially on Mac OS.
|
||||
|
||||
- fix a couple of compilation warnings.
|
||||
|
Loading…
Reference in New Issue
Block a user