use init_google.h in c++ examples

This commit is contained in:
Laurent Perron
2022-02-25 09:47:52 +01:00
parent 19667205a2
commit 4c8570a57c
31 changed files with 80 additions and 130 deletions

View File

@@ -18,13 +18,12 @@
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/flags/parse.h"
#include "absl/flags/usage.h"
#include "absl/strings/str_format.h"
#include "examples/cpp/parse_dimacs_assignment.h"
#include "examples/cpp/print_dimacs_assignment.h"
#include "ortools/algorithms/hungarian.h"
#include "ortools/base/commandlineflags.h"
#include "ortools/base/init_google.h"
#include "ortools/base/logging.h"
#include "ortools/base/timer.h"
#include "ortools/graph/ebert_graph.h"
@@ -188,8 +187,7 @@ int main(int argc, char* argv[]) {
} else {
usage = absl::StrFormat(kUsageTemplate, argv[0]);
}
google::InitGoogleLogging(usage.c_str());
absl::ParseCommandLine(argc, argv);
InitGoogle(usage.c_str(), &argc, &argv, true);
if (argc < 2) {
LOG(FATAL) << usage;