Bug 1012814 part 1: Use size_t instead of uint32_t, for value compared against nsTArray::NoIndex, in nsTransferable.cpp. r=bjacob
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 20 May 2014 12:43:57 -0700
changeset 184002 9c12250ddf175c151661626a3f3a3d7ed4eac9e4
parent 184001 57f1981b6a49710bf7a8afcd57d2410c165e1ab3
child 184003 92982748e41b30215c0181e843cd53364866a7e4
push id26810
push usercbook@mozilla.com
push dateWed, 21 May 2014 11:46:36 +0000
treeherdermozilla-central@50fb8c4db2fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs1012814
milestone32.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 1012814 part 1: Use size_t instead of uint32_t, for value compared against nsTArray::NoIndex, in nsTransferable.cpp. r=bjacob
widget/xpwidgets/nsTransferable.cpp
--- a/widget/xpwidgets/nsTransferable.cpp
+++ b/widget/xpwidgets/nsTransferable.cpp
@@ -458,18 +458,18 @@ nsTransferable::AddDataFlavor(const char
 // Removes a data flavor (and causes the data to be destroyed). Error if
 // the requested flavor is not present.
 //
 NS_IMETHODIMP
 nsTransferable::RemoveDataFlavor(const char *aDataFlavor)
 {
   MOZ_ASSERT(mInitialized);
 
-  uint32_t idx;
-  if ((idx = GetDataForFlavor(mDataArray, aDataFlavor)) != mDataArray.NoIndex) {
+  size_t idx = GetDataForFlavor(mDataArray, aDataFlavor);
+  if (idx != mDataArray.NoIndex) {
     mDataArray.RemoveElementAt (idx);
     return NS_OK;
   }
   return NS_ERROR_FAILURE;
 }
 
 
 /**