mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
f4bde46b0f
(cherry picked from commit b7894032b4
)
Signed-off-by: Domen Kožar <domen@dev.si>
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From 8207a31c26cc42fee79363a14c4a8f4fcbfffe63 Mon Sep 17 00:00:00 2001
|
|
From: Jordan DeLong <jdelong@fb.com>
|
|
Date: Mon, 6 Oct 2014 18:30:28 -0700
|
|
Subject: [PATCH] Remove some MIN/MAX macro uses in the emitter
|
|
|
|
Summary: <algorithm> has preferable type-safe versions that don't double-eval
|
|
their args.
|
|
|
|
Reviewed By: @paulbiss
|
|
|
|
Differential Revision: D1599803
|
|
---
|
|
hphp/compiler/analysis/emitter.cpp | 6 +++---
|
|
hphp/util/compatibility.h | 4 ----
|
|
2 files changed, 3 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/hphp/compiler/analysis/emitter.cpp b/hphp/compiler/analysis/emitter.cpp
|
|
index 321e637..b1d3f2d 100644
|
|
--- a/hphp/compiler/analysis/emitter.cpp
|
|
+++ b/hphp/compiler/analysis/emitter.cpp
|
|
@@ -799,8 +799,8 @@ void SymbolicStack::push(char sym) {
|
|
if (sym != StackSym::W && sym != StackSym::K && sym != StackSym::L &&
|
|
sym != StackSym::T && sym != StackSym::I && sym != StackSym::H) {
|
|
m_actualStack.push_back(m_symStack.size());
|
|
- *m_actualStackHighWaterPtr = MAX(*m_actualStackHighWaterPtr,
|
|
- (int)m_actualStack.size());
|
|
+ *m_actualStackHighWaterPtr = std::max(*m_actualStackHighWaterPtr,
|
|
+ (int)m_actualStack.size());
|
|
}
|
|
m_symStack.push_back(SymEntry(sym));
|
|
}
|
|
@@ -1010,7 +1010,7 @@ int SymbolicStack::sizeActual() const {
|
|
|
|
void SymbolicStack::pushFDesc() {
|
|
m_fdescCount += kNumActRecCells;
|
|
- *m_fdescHighWaterPtr = MAX(*m_fdescHighWaterPtr, m_fdescCount);
|
|
+ *m_fdescHighWaterPtr = std::max(*m_fdescHighWaterPtr, m_fdescCount);
|
|
}
|
|
|
|
void SymbolicStack::popFDesc() {
|