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

Side by Side Diff: o3d/converter_edge/cross/verifier_main.cc

Issue 270062: Use ASCII strings for switch names. (Closed)
Patch Set: victory Created 11 years, 2 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 unified diff | Download patch
« no previous file with comments | « o3d/converter_edge/cross/converter_main.cc ('k') | tools/imagediff/image_diff.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } else if (values.size()== 2) { 75 } else if (values.size()== 2) {
76 in_filename = o3d::WideToFilePath(values[0]); 76 in_filename = o3d::WideToFilePath(values[0]);
77 out_filename = o3d::WideToFilePath(values[1]); 77 out_filename = o3d::WideToFilePath(values[1]);
78 } else { 78 } else {
79 std::cerr << "Usage: " << FilePath(argv[0]).BaseName().value() 79 std::cerr << "Usage: " << FilePath(argv[0]).BaseName().value()
80 << " [--no-condition] <infile.fx> [<outfile.fx>]\n"; 80 << " [--no-condition] <infile.fx> [<outfile.fx>]\n";
81 return EXIT_FAILURE; 81 return EXIT_FAILURE;
82 } 82 }
83 83
84 o3d::converter::Options options; 84 o3d::converter::Options options;
85 options.condition = !command_line->HasSwitch(L"no-condition"); 85 options.condition = !command_line->HasSwitch("no-condition");
86 86
87 if (!options.condition && !out_filename.empty()) { 87 if (!options.condition && !out_filename.empty()) {
88 std::cerr << "Warning: Ignoring output filename because conditioning " 88 std::cerr << "Warning: Ignoring output filename because conditioning "
89 << "has been turned off.\n"; 89 << "has been turned off.\n";
90 out_filename = FilePath(); 90 out_filename = FilePath();
91 } 91 }
92 92
93 o3d::String errors; 93 o3d::String errors;
94 bool result = o3d::converter::Verify(in_filename, out_filename, options, 94 bool result = o3d::converter::Verify(in_filename, out_filename, options,
95 &errors); 95 &errors);
96 if (result) { 96 if (result) {
97 std::cerr << "Shader in '" << o3d::FilePathToUTF8(in_filename).c_str() 97 std::cerr << "Shader in '" << o3d::FilePathToUTF8(in_filename).c_str()
98 << "' has been validated." << std::endl; 98 << "' has been validated." << std::endl;
99 return EXIT_SUCCESS; 99 return EXIT_SUCCESS;
100 } else { 100 } else {
101 std::cerr << errors.c_str() << std::endl; 101 std::cerr << errors.c_str() << std::endl;
102 std::cerr << "Shader in '" << o3d::FilePathToUTF8(in_filename).c_str() 102 std::cerr << "Shader in '" << o3d::FilePathToUTF8(in_filename).c_str()
103 << "' FAILED to be validated." << std::endl; 103 << "' FAILED to be validated." << std::endl;
104 return EXIT_FAILURE; 104 return EXIT_FAILURE;
105 } 105 }
106 } 106 }
OLDNEW
« no previous file with comments | « o3d/converter_edge/cross/converter_main.cc ('k') | tools/imagediff/image_diff.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698