diff --git a/ortools/sat/cuts.cc b/ortools/sat/cuts.cc index 94cb4210dc..4d0c02f76d 100644 --- a/ortools/sat/cuts.cc +++ b/ortools/sat/cuts.cc @@ -1384,7 +1384,7 @@ CutGenerator CreatePositiveMultiplicationCutGenerator(AffineExpression z, if (x_lb == x_ub || y_lb == y_ub) return true; // TODO(user): Compute a better bound (int_max / 4 ?). - constexpr int64_t kMaxSafeInteger = (int64_t{1} << 53) - 1; + const int64_t kMaxSafeInteger = (int64_t{1} << 53) - 1; // Check for overflow with the product of expression bounds and the // product of one expression bound times the constant part of the other diff --git a/ortools/sat/parameters_validation.cc b/ortools/sat/parameters_validation.cc index 6c0fe92b44..4d3b987f09 100644 --- a/ortools/sat/parameters_validation.cc +++ b/ortools/sat/parameters_validation.cc @@ -47,7 +47,7 @@ std::string ValidateParameters(const SatParameters& params) { } if (params.num_search_workers() < 0) { - return "Parameters num_search_workers must be positive"; + return "Parameters num_search_workers must be non-negative"; } return ""; diff --git a/ortools/sat/python/BUILD.bazel b/ortools/sat/python/BUILD.bazel index 933b653396..d0734f14fc 100644 --- a/ortools/sat/python/BUILD.bazel +++ b/ortools/sat/python/BUILD.bazel @@ -7,10 +7,10 @@ load("@rules_python//python:defs.bzl", "py_library") pybind_extension( name = "swig_helper", srcs = ["swig_helper.cc"], - visibility = ["//visibility:public"], data = [ "//ortools/util/python:sorted_interval_list.so", ], + visibility = ["//visibility:public"], deps = [ "//ortools/sat:cp_model_cc_proto", "//ortools/sat:swig_helper", @@ -21,10 +21,10 @@ pybind_extension( py_library( name = "cp_model_helper", srcs = ["cp_model_helper.py"], - visibility = ["//visibility:public"], data = [ ":swig_helper.so", ], + visibility = ["//visibility:public"], deps = [ requirement("numpy"), ], diff --git a/ortools/sat/samples/code_samples.bzl b/ortools/sat/samples/code_samples.bzl index 1a7b3b2b62..9efa336806 100644 --- a/ortools/sat/samples/code_samples.bzl +++ b/ortools/sat/samples/code_samples.bzl @@ -16,7 +16,7 @@ def code_sample_cc(name): ) native.cc_test( - name = name + "_test", + name = name + "_cc_test", size = "small", srcs = [name + ".cc"], args = [name], @@ -54,4 +54,4 @@ def code_sample_py(name): def code_sample_cc_py(name): code_sample_cc(name = name) - code_sample_py(name = name) \ No newline at end of file + code_sample_py(name = name) diff --git a/ortools/sat/samples/code_samples_cc_test.sh b/ortools/sat/samples/code_samples_cc_test.sh index 1e46e85522..9d0234ee42 100755 --- a/ortools/sat/samples/code_samples_cc_test.sh +++ b/ortools/sat/samples/code_samples_cc_test.sh @@ -1,6 +1,5 @@ #!/bin/bash - function test::operations_research_examples::code_samples_sat_cc() { EXPECT_SUCCEED "${TEST_SRCDIR}/google3/ortools/sat/samples"/$1_cc" } diff --git a/ortools/sat/samples/nqueens_sat.cc b/ortools/sat/samples/nqueens_sat.cc index 2f96f4d575..cab91a3bca 100644 --- a/ortools/sat/samples/nqueens_sat.cc +++ b/ortools/sat/samples/nqueens_sat.cc @@ -114,8 +114,8 @@ int main(int argc, char** argv) { int board_size = 8; if (argc > 1) { if (!absl::SimpleAtoi(argv[1], &board_size)) { - LOG(INFO) << "Cannot parse '" << argv[1] - << "', using default value = 8."; + LOG(INFO) << "Cannot parse '" << argv[1] + << "', using the default value of 8."; board_size = 8; } }