Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: src/lexer/lexer-shell.cc

Issue 143223002: Experimental lexer: fix style issues. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lexer/experimental-scanner.h ('k') | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/lexer-shell.cc
diff --git a/src/lexer/lexer-shell.cc b/src/lexer/lexer-shell.cc
index 0c90926f687edfd4c46b4b719f66061fd56f0e6a..bc884598cd10e34ed7d199c29f24b2db4c04f958 100644
--- a/src/lexer/lexer-shell.cc
+++ b/src/lexer/lexer-shell.cc
@@ -72,8 +72,7 @@ byte* ReadFile(const char* name, byte** end, int repeat,
}
*end = &chars[size];
- if (!convert_to_utf16)
- return chars;
+ if (!convert_to_utf16) return chars;
// Length of new_chars is not strictly accurate, but should be enough.
uint16_t* new_chars = new uint16_t[size];
@@ -83,8 +82,9 @@ byte* ReadFile(const char* name, byte** end, int repeat,
uc32 c;
// The 32-bit char type is probably only so that we can have -1 as a return
// value. If the char is not -1, it should fit into 16 bits.
- while ((c = stream.Advance()) != -1)
+ while ((c = stream.Advance()) != -1) {
*cursor++ = c;
+ }
*end = reinterpret_cast<byte*>(cursor);
}
delete[] chars;
« no previous file with comments | « src/lexer/experimental-scanner.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698