Bug 1577867 - Remove using namespace std from image/ r=tnikkel
authorEric Rahm <erahm@mozilla.com>
Fri, 30 Aug 2019 19:58:25 +0000
changeset 551487 98bdc3047120ee9d3700f4c13bc09b0db585c58f
parent 551486 c9487e92cf629f7ce92fe5074323fdfb46562a2b
child 551488 52721fabd4d12278444dccd78a90cbb2bbba3720
push id11865
push userbtara@mozilla.com
push dateMon, 02 Sep 2019 08:54:37 +0000
treeherdermozilla-beta@37f59c4671b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1577867
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1577867 - Remove using namespace std from image/ r=tnikkel Differential Revision: https://phabricator.services.mozilla.com/D44250
image/imgLoader.cpp
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -2,16 +2,18 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Undefine windows version of LoadImage because our code uses that name.
 #undef LoadImage
 
+#include <algorithm>
+
 #include "ImageLogging.h"
 #include "imgLoader.h"
 
 #include "mozilla/Attributes.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/Move.h"
 #include "mozilla/NullPrincipal.h"
 #include "mozilla/Preferences.h"
@@ -993,19 +995,16 @@ void imgCacheEntry::SetHasNoProxies(bool
 }
 
 imgCacheQueue::imgCacheQueue() : mDirty(false), mSize(0) {}
 
 void imgCacheQueue::UpdateSize(int32_t diff) { mSize += diff; }
 
 uint32_t imgCacheQueue::GetSize() const { return mSize; }
 
-#include <algorithm>
-using namespace std;
-
 void imgCacheQueue::Remove(imgCacheEntry* entry) {
   uint64_t index = mQueue.IndexOf(entry);
   if (index == queueContainer::NoIndex) {
     return;
   }
 
   mSize -= mQueue[index]->GetDataSize();