From 08c9669572c733d9ad3056ff3d3743476e94e84b Mon Sep 17 00:00:00 2001 From: Mizux Seiha Date: Fri, 18 Oct 2024 17:40:16 +0200 Subject: [PATCH] fix msvc compile --- ortools/graph/eulerian_path_test.cc | 11 +++-------- ortools/math_opt/cpp/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ortools/graph/eulerian_path_test.cc b/ortools/graph/eulerian_path_test.cc index 10fafbecebd..bf1344caad7 100644 --- a/ortools/graph/eulerian_path_test.cc +++ b/ortools/graph/eulerian_path_test.cc @@ -60,9 +60,7 @@ void TestPath(const int arcs[][2], int num_nodes, int num_arcs, bool eulerian, } TEST(EulerianTourTest, EmptyGraph) { - const int kArcs[][2] = {}; - const int kExpectedTour[] = {}; - TestTour(kArcs, 0, 0, -1, true, kExpectedTour); + TestTour(nullptr, 0, 0, -1, true, nullptr); } // Builds a tour on the following graph: @@ -103,14 +101,11 @@ TEST(EulerianTourTest, MultiCycle) { TEST(EulerianTourTest, NonEulerian) { const int kArcs[][2] = {{0, 1}, {1, 4}, {1, 5}, {2, 3}, {2, 4}, {2, 5}, {3, 0}}; - const int kExpectedTour[] = {}; - TestTour(kArcs, 6, ABSL_ARRAYSIZE(kArcs), 1, false, kExpectedTour); + TestTour(kArcs, 6, ABSL_ARRAYSIZE(kArcs), 1, false, nullptr); } TEST(EulerianPathTest, EmptyGraph) { - const int kArcs[][2] = {}; - const int kExpectedPath[] = {}; - TestPath(kArcs, 0, 0, true, kExpectedPath); + TestPath(nullptr, 0, 0, true, nullptr); } // Builds a path on the following graph: diff --git a/ortools/math_opt/cpp/CMakeLists.txt b/ortools/math_opt/cpp/CMakeLists.txt index a4e3b0e0dd4..cc9dd125c3b 100644 --- a/ortools/math_opt/cpp/CMakeLists.txt +++ b/ortools/math_opt/cpp/CMakeLists.txt @@ -33,7 +33,7 @@ ortools_cxx_library( "matchers.cc" "matchers.h" TYPE - SHARED + STATIC LINK_LIBRARIES absl::log absl::status