Bug 795584 - Add a template parameter to clamped. r=Ms2ger
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sun, 30 Sep 2012 14:19:34 -0400
changeset 108698 42e5480fb109bf8798d801037ba953db4bcfa911
parent 108697 18e98f1040c2f97cbba36d144090c74bf9b385b6
child 108699 738c9ad0f809bea8941ecc6ffd882b0fd416639e
push id15634
push userryanvm@gmail.com
push dateSun, 30 Sep 2012 18:19:28 +0000
treeherdermozilla-inbound@42e5480fb109 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs795584
milestone18.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 795584 - Add a template parameter to clamped. r=Ms2ger
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -1188,17 +1188,17 @@ HttpChannelChild::ResumeAt(uint64_t star
 
 //-----------------------------------------------------------------------------
 // HttpChannelChild::nsISupportsPriority
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 HttpChannelChild::SetPriority(int32_t aPriority)
 {
-  int16_t newValue = clamped(aPriority, INT16_MIN, INT16_MAX);
+  int16_t newValue = clamped<int32_t>(aPriority, INT16_MIN, INT16_MAX);
   if (mPriority == newValue)
     return NS_OK;
   mPriority = newValue;
   if (RemoteChannelExists())
     SendSetPriority(mPriority);
   return NS_OK;
 }
 
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -4484,17 +4484,17 @@ nsHttpChannel::SetupFallbackChannel(cons
 
 //-----------------------------------------------------------------------------
 // nsHttpChannel::nsISupportsPriority
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 nsHttpChannel::SetPriority(int32_t value)
 {
-    int16_t newValue = clamped(value, INT16_MIN, INT16_MAX);
+    int16_t newValue = clamped<int32_t>(value, INT16_MIN, INT16_MAX);
     if (mPriority == newValue)
         return NS_OK;
     mPriority = newValue;
     if (mTransaction)
         gHttpHandler->RescheduleTransaction(mTransaction, mPriority);
     return NS_OK;
 }