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

Unified Diff: tools/gn/function_write_file.cc

Issue 25153002: Enable compiling GN by default. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set:  Created 7 years, 3 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 | « tools/gn/function_exec_script.cc ('k') | tools/gn/input_file_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_write_file.cc
diff --git a/tools/gn/function_write_file.cc b/tools/gn/function_write_file.cc
index f79416828f6882e85de177a44e570d26433a11f3..0c0dd000987e15901545ae5186c526c55be37cf6 100644
--- a/tools/gn/function_write_file.cc
+++ b/tools/gn/function_write_file.cc
@@ -76,9 +76,9 @@ Value RunWriteFile(Scope* scope,
"I was using \"" + FilePathToUTF8(file_path.DirName()) + "\".");
return Value();
}
- if (file_util::WriteFile(file_path,
- contents_string.c_str(), contents_string.size())
- != static_cast<int>(contents_string.size())) {
+ int int_size = static_cast<int>(contents_string.size());
+ if (file_util::WriteFile(file_path, contents_string.c_str(), int_size)
+ != int_size) {
*err = Err(function->function(), "Unable to write file.",
"I was writing \"" + FilePathToUTF8(file_path) + "\".");
return Value();
« no previous file with comments | « tools/gn/function_exec_script.cc ('k') | tools/gn/input_file_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698