From 640798bb9951bc512bcbcffbe136d42372c99322 Mon Sep 17 00:00:00 2001
From: Monty Brandenberg <monty@lindenlab.com>
Date: Fri, 1 Jun 2012 18:18:53 -0400
Subject: [PATCH] Platform fixups:  typedef for priority_queue, more specific
 comparator functor.

---
 indra/llcorehttp/_httpoperation.h  | 13 -------------
 indra/llcorehttp/_httpoprequest.h  | 13 +++++++++++++
 indra/llcorehttp/_httpreadyqueue.h | 12 +++++++-----
 3 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/indra/llcorehttp/_httpoperation.h b/indra/llcorehttp/_httpoperation.h
index 4d9298d8010..01e26029d22 100644
--- a/indra/llcorehttp/_httpoperation.h
+++ b/indra/llcorehttp/_httpoperation.h
@@ -159,19 +159,6 @@ class HttpOpNull : public HttpOperation
 };  // end class HttpOpNull
 
 
-/// HttpOpCompare isn't an operation but a uniform comparison
-/// functor for STL containers that order by priority.  Mainly
-/// used for the ready queue container but defined here.
-class HttpOpCompare
-{
-public:
-	bool operator()(const HttpOperation * lhs, const HttpOperation * rhs)
-		{
-			return lhs->mReqPriority > rhs->mReqPriority;
-		}
-};  // end class HttpOpCompare
-
-	
 }   // end namespace LLCore
 
 #endif	// _LLCORE_HTTP_OPERATION_H_
diff --git a/indra/llcorehttp/_httpoprequest.h b/indra/llcorehttp/_httpoprequest.h
index e973f6ad26a..0cad4e84597 100644
--- a/indra/llcorehttp/_httpoprequest.h
+++ b/indra/llcorehttp/_httpoprequest.h
@@ -131,6 +131,19 @@ class HttpOpRequest : public HttpOperation
 };  // end class HttpOpRequest
 
 
+/// HttpOpRequestCompare isn't an operation but a uniform comparison
+/// functor for STL containers that order by priority.  Mainly
+/// used for the ready queue container but defined here.
+class HttpOpRequestCompare
+{
+public:
+	bool operator()(const HttpOpRequest * lhs, const HttpOpRequest * rhs)
+		{
+			return lhs->mReqPriority > rhs->mReqPriority;
+		}
+};  // end class HttpOpRequestCompare
+
+
 }   // end namespace LLCore
 
 #endif	// _LLCORE_HTTP_OPREQUEST_H_
diff --git a/indra/llcorehttp/_httpreadyqueue.h b/indra/llcorehttp/_httpreadyqueue.h
index 283e868b4c0..2cd96aefe35 100644
--- a/indra/llcorehttp/_httpreadyqueue.h
+++ b/indra/llcorehttp/_httpreadyqueue.h
@@ -30,7 +30,7 @@
 
 #include <queue>
 
-#include "_httpoperation.h"
+#include "_httpoprequest.h"
 
 
 namespace LLCore
@@ -49,13 +49,15 @@ class HttpOpRequest;
 /// Threading:  not thread-safe.  Expected to be used entirely by
 /// a single thread, typically a worker thread of some sort.
 
-class HttpReadyQueue : public std::priority_queue<HttpOpRequest *,
-												  std::deque<HttpOpRequest *>,
-												  LLCore::HttpOpCompare>
+typedef std::priority_queue<HttpOpRequest *,
+							std::deque<HttpOpRequest *>,
+							LLCore::HttpOpRequestCompare> HttpReadyQueueBase;
+
+class HttpReadyQueue : public HttpReadyQueueBase
 {
 public:
 	HttpReadyQueue()
-		: priority_queue()
+		: HttpReadyQueueBase()
 		{}
 	
 	~HttpReadyQueue()
-- 
GitLab