Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1529)

Unified Diff: Source/core/svg/animation/SVGSMILElement.cpp

Issue 333173002: Removing using declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/animation/SMILTimeContainer.cpp ('k') | Source/core/xml/XMLTreeViewer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/animation/SVGSMILElement.cpp
diff --git a/Source/core/svg/animation/SVGSMILElement.cpp b/Source/core/svg/animation/SVGSMILElement.cpp
index 01c7c6f842b01efd3a5ca1f9dd6f5f49262a5db4..c6b1daf6b46d38d70941f2e61836e2c256379da5 100644
--- a/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/Source/core/svg/animation/SVGSMILElement.cpp
@@ -42,8 +42,6 @@
#include "wtf/StdLibExtras.h"
#include "wtf/Vector.h"
-using namespace std;
-
namespace WebCore {
class RepeatEvent FINAL : public Event {
@@ -797,7 +795,7 @@ SMILTime SVGSMILElement::minValue() const
SMILTime SVGSMILElement::simpleDuration() const
{
- return min(dur(), SMILTime::indefinite());
+ return std::min(dur(), SMILTime::indefinite());
}
void SVGSMILElement::addBeginTime(SMILTime eventTime, SMILTime beginTime, SMILTimeWithOrigin::Origin origin)
@@ -869,7 +867,7 @@ SMILTime SVGSMILElement::repeatingDuration() const
if (!simpleDuration || (repeatDur.isUnresolved() && repeatCount.isUnresolved()))
return simpleDuration;
SMILTime repeatCountDuration = simpleDuration * repeatCount;
- return min(repeatCountDuration, min(repeatDur, SMILTime::indefinite()));
+ return std::min(repeatCountDuration, std::min(repeatDur, SMILTime::indefinite()));
}
SMILTime SVGSMILElement::resolveActiveEnd(SMILTime resolvedBegin, SMILTime resolvedEnd) const
@@ -882,7 +880,7 @@ SMILTime SVGSMILElement::resolveActiveEnd(SMILTime resolvedBegin, SMILTime resol
else if (!resolvedEnd.isFinite())
preliminaryActiveDuration = repeatingDuration();
else
- preliminaryActiveDuration = min(repeatingDuration(), resolvedEnd - resolvedBegin);
+ preliminaryActiveDuration = std::min(repeatingDuration(), resolvedEnd - resolvedBegin);
SMILTime minValue = this->minValue();
SMILTime maxValue = this->maxValue();
@@ -892,15 +890,15 @@ SMILTime SVGSMILElement::resolveActiveEnd(SMILTime resolvedBegin, SMILTime resol
minValue = 0;
maxValue = SMILTime::indefinite();
}
- return resolvedBegin + min(maxValue, max(minValue, preliminaryActiveDuration));
+ return resolvedBegin + std::min(maxValue, std::max(minValue, preliminaryActiveDuration));
}
SMILInterval SVGSMILElement::resolveInterval(ResolveInterval resolveIntervalType) const
{
bool first = resolveIntervalType == FirstInterval;
// See the pseudocode in http://www.w3.org/TR/SMIL3/smil-timing.html#q90.
- SMILTime beginAfter = first ? -numeric_limits<double>::infinity() : m_interval.end;
- SMILTime lastIntervalTempEnd = numeric_limits<double>::infinity();
+ SMILTime beginAfter = first ? -std::numeric_limits<double>::infinity() : m_interval.end;
+ SMILTime lastIntervalTempEnd = std::numeric_limits<double>::infinity();
while (true) {
bool equalsMinimumOK = !first || m_interval.end > m_interval.begin;
SMILTime tempBegin = findInstanceTime(Begin, beginAfter, equalsMinimumOK);
@@ -936,7 +934,7 @@ void SVGSMILElement::resolveFirstInterval()
if (!firstInterval.begin.isUnresolved() && firstInterval != m_interval) {
m_interval = firstInterval;
notifyDependentsIntervalChanged();
- m_nextProgressTime = min(m_nextProgressTime, m_interval.begin);
+ m_nextProgressTime = std::min(m_nextProgressTime, m_interval.begin);
if (m_timeContainer)
m_timeContainer->notifyIntervalsChanged();
@@ -951,7 +949,7 @@ bool SVGSMILElement::resolveNextInterval()
if (!nextInterval.begin.isUnresolved() && nextInterval.begin != m_interval.begin) {
m_interval = nextInterval;
notifyDependentsIntervalChanged();
- m_nextProgressTime = min(m_nextProgressTime, m_interval.begin);
+ m_nextProgressTime = std::min(m_nextProgressTime, m_interval.begin);
return true;
}
@@ -1096,7 +1094,7 @@ float SVGSMILElement::calculateAnimationPercentAndRepeat(SMILTime elapsed, unsig
double percent = (m_interval.end.value() - m_interval.begin.value()) / simpleDuration.value();
percent = percent - floor(percent);
- if (percent < numeric_limits<float>::epsilon() || 1 - percent < numeric_limits<float>::epsilon())
+ if (percent < std::numeric_limits<float>::epsilon() || 1 - percent < std::numeric_limits<float>::epsilon())
return 1.0f;
return narrowPrecisionToFloat(percent);
}
« no previous file with comments | « Source/core/svg/animation/SMILTimeContainer.cpp ('k') | Source/core/xml/XMLTreeViewer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698