Skip to content

Commit 09aa966

Browse files
committed
constness
1 parent d25d3cd commit 09aa966

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

simplecpp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ class simplecpp::TokenList::Stream {
240240
if (bom == 0 && static_cast<char>(peek()) == '\n')
241241
(void)get();
242242
else if (isUtf16) {
243-
int c1 = get();
244-
int c2 = get();
245-
int ch16 = (bom == 0xfeff) ? (c1<<8 | c2) : (c2<<8 | c1);
243+
const int c1 = get();
244+
const int c2 = get();
245+
const int ch16 = (bom == 0xfeff) ? (c1<<8 | c2) : (c2<<8 | c1);
246246
if (ch16 != '\n') {
247247
unget();
248248
unget();
@@ -293,7 +293,7 @@ class simplecpp::TokenList::Stream {
293293

294294
// The UTF-16 BOM is 0xfffe or 0xfeff.
295295
if (ch1 >= 0xfe) {
296-
unsigned short bom = (static_cast<unsigned char>(get()) << 8);
296+
const unsigned short bom = (static_cast<unsigned char>(get()) << 8);
297297
if (peek() >= 0xfe)
298298
return bom | static_cast<unsigned char>(get());
299299
unget();

0 commit comments

Comments
 (0)