Skip to content

Commit

Permalink
fixup indent
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 30, 2024
1 parent 4d2dfae commit b3994a2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions ortools/base/sysinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
#if defined(__APPLE__) && defined(__GNUC__) // MacOS
#include <mach/mach_init.h>
#include <mach/task.h>
#elif (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) // [Free,Net,Open]BSD
#elif (defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__)) // [Free,Net,Open]BSD
#include <sys/resource.h>
#include <sys/time.h>
// Windows
Expand Down Expand Up @@ -48,8 +49,9 @@ int64_t GetProcessMemoryUsage() {
int64_t resident_memory = t_info.resident_size;
return resident_memory;
}
#elif defined(__GNUC__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && \
!defined(__EMSCRIPTEN__) && !defined(_WIN32) // Linux
#elif defined(__GNUC__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && \
!defined(__OpenBSD__) && !defined(__EMSCRIPTEN__) && \
!defined(_WIN32) // Linux
int64_t GetProcessMemoryUsage() {
unsigned size = 0;
char buf[30];
Expand All @@ -61,7 +63,8 @@ int64_t GetProcessMemoryUsage() {
fclose(pf);
return int64_t{1024} * size;
}
#elif (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) // [Free,Net,Open]BSD
#elif (defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__)) // [Free,Net,Open]BSD
int64_t GetProcessMemoryUsage() {
int who = RUSAGE_SELF;
struct rusage rusage;
Expand Down
2 changes: 1 addition & 1 deletion ortools/flatzinc/presolve.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ bool IsIncreasingAndContiguous(absl::Span<const int64_t> values) {
return true;
}

bool AreOnesFollowedByMinusOne(const std::vector<int64_t>& coeffs) {
bool AreOnesFollowedByMinusOne(absl::Span<const int64_t> coeffs) {
CHECK(!coeffs.empty());
for (int i = 0; i < coeffs.size() - 1; ++i) {
if (coeffs[i] != 1) {
Expand Down
4 changes: 2 additions & 2 deletions ortools/util/zvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#ifndef OR_TOOLS_UTIL_ZVECTOR_H_
#define OR_TOOLS_UTIL_ZVECTOR_H_

#if (defined(__APPLE__) || \
defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \
#if (defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__)) && \
defined(__GNUC__)
#include <machine/endian.h>
#elif !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__MINGW64__)
Expand Down

0 comments on commit b3994a2

Please sign in to comment.