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

Unified Diff: Source/platform/Timer.cpp

Issue 511333002: Removing "using" declarations that import names in the C++ Standard library.(Source/platform/audio) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/platform/ThreadTimers.cpp ('k') | Source/platform/audio/AudioDelayDSPKernel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/Timer.cpp
diff --git a/Source/platform/Timer.cpp b/Source/platform/Timer.cpp
index 7ca3953f6b12873b6f1cb3d4e125ad3df30b5270..46e7d20c36c2eacb9b2d239a48a31ca0cc206181 100644
--- a/Source/platform/Timer.cpp
+++ b/Source/platform/Timer.cpp
@@ -35,8 +35,6 @@
#include <math.h>
#include <limits>
-using namespace std;
-
namespace blink {
class TimerHeapReference;
@@ -106,7 +104,7 @@ inline void swap(TimerHeapReference a, TimerHeapReference b)
// Class to represent iterators in the heap when calling the standard library heap algorithms.
// Uses a custom pointer and reference type that update indices for pointers in the heap.
-class TimerHeapIterator : public iterator<random_access_iterator_tag, TimerBase*, ptrdiff_t, TimerHeapPointer, TimerHeapReference> {
+class TimerHeapIterator : public std::iterator<std::random_access_iterator_tag, TimerBase*, ptrdiff_t, TimerHeapPointer, TimerHeapReference> {
public:
explicit TimerHeapIterator(TimerBase** pointer) : m_pointer(pointer) { checkConsistency(); }
@@ -180,7 +178,7 @@ inline bool TimerHeapLessThanFunction::operator()(const TimerBase* a, const Time
// We need to look at the difference of the insertion orders instead of comparing the two
// outright in case of overflow.
unsigned difference = a->m_heapInsertionOrder - b->m_heapInsertionOrder;
- return difference < numeric_limits<unsigned>::max() / 2;
+ return difference < std::numeric_limits<unsigned>::max() / 2;
}
// ----------------
@@ -294,7 +292,7 @@ inline void TimerBase::heapPop()
{
// Temporarily force this timer to have the minimum key so we can pop it.
double fireTime = m_nextFireTime;
- m_nextFireTime = -numeric_limits<double>::infinity();
+ m_nextFireTime = -std::numeric_limits<double>::infinity();
heapDecreaseKey();
heapPopMin();
m_nextFireTime = fireTime;
@@ -409,7 +407,7 @@ void TimerBase::didChangeAlignmentInterval()
double TimerBase::nextUnalignedFireInterval() const
{
ASSERT(isActive());
- return max(m_unalignedNextFireTime - monotonicallyIncreasingTime(), 0.0);
+ return std::max(m_unalignedNextFireTime - monotonicallyIncreasingTime(), 0.0);
}
} // namespace blink
« no previous file with comments | « Source/platform/ThreadTimers.cpp ('k') | Source/platform/audio/AudioDelayDSPKernel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698