From 59986fc4135a5597580342b27e8c445e9dffacd0 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Thu, 23 Jul 2015 12:28:29 -0700 Subject: [PATCH] Bug 931571, part 3 - Rename return value of macro generated methods. r=froydnj --- xpcom/ds/nsVariant.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xpcom/ds/nsVariant.cpp b/xpcom/ds/nsVariant.cpp index f3c9218acde..d4ca7435a52 100644 --- a/xpcom/ds/nsVariant.cpp +++ b/xpcom/ds/nsVariant.cpp @@ -467,9 +467,9 @@ bad: #define NUMERIC_CONVERSION_METHOD_BEGIN(type_, Ctype_, name_) \ /* static */ nsresult \ nsVariant::ConvertTo##name_ (const nsDiscriminatedUnion& data, \ - Ctype_ *_retval) \ + Ctype_* aResult) \ { \ - TRIVIAL_DATA_CONVERTER(type_, data, m##name_##Value, _retval) \ + TRIVIAL_DATA_CONVERTER(type_, data, m##name_##Value, aResult) \ nsDiscriminatedUnion tempData; \ nsresult rv = ToManageableNumber(data, &tempData); \ /* */ \ @@ -484,7 +484,7 @@ nsVariant::ConvertTo##name_ (const nsDiscriminatedUnion& data, \ #define CASE__NUMERIC_CONVERSION_INT32_JUST_CAST(Ctype_) \ case nsIDataType::VTYPE_INT32: \ - *_retval = ( Ctype_ ) tempData.u.mInt32Value; \ + *aResult = ( Ctype_ ) tempData.u.mInt32Value; \ return rv; #define CASE__NUMERIC_CONVERSION_INT32_MIN_MAX(Ctype_, min_, max_) \ @@ -493,13 +493,13 @@ nsVariant::ConvertTo##name_ (const nsDiscriminatedUnion& data, \ int32_t value = tempData.u.mInt32Value; \ if(value < min_ || value > max_) \ return NS_ERROR_LOSS_OF_SIGNIFICANT_DATA; \ - *_retval = ( Ctype_ ) value; \ + *aResult = ( Ctype_ ) value; \ return rv; \ } #define CASE__NUMERIC_CONVERSION_UINT32_JUST_CAST(Ctype_) \ case nsIDataType::VTYPE_UINT32: \ - *_retval = ( Ctype_ ) tempData.u.mUint32Value; \ + *aResult = ( Ctype_ ) tempData.u.mUint32Value; \ return rv; #define CASE__NUMERIC_CONVERSION_UINT32_MAX(Ctype_, max_) \ @@ -508,13 +508,13 @@ nsVariant::ConvertTo##name_ (const nsDiscriminatedUnion& data, \ uint32_t value = tempData.u.mUint32Value; \ if(value > max_) \ return NS_ERROR_LOSS_OF_SIGNIFICANT_DATA; \ - *_retval = ( Ctype_ ) value; \ + *aResult = ( Ctype_ ) value; \ return rv; \ } #define CASE__NUMERIC_CONVERSION_DOUBLE_JUST_CAST(Ctype_) \ case nsIDataType::VTYPE_DOUBLE: \ - *_retval = ( Ctype_ ) tempData.u.mDoubleValue; \ + *aResult = ( Ctype_ ) tempData.u.mDoubleValue; \ return rv; #define CASE__NUMERIC_CONVERSION_DOUBLE_MIN_MAX(Ctype_, min_, max_) \ @@ -523,7 +523,7 @@ nsVariant::ConvertTo##name_ (const nsDiscriminatedUnion& data, \ double value = tempData.u.mDoubleValue; \ if(value < min_ || value > max_) \ return NS_ERROR_LOSS_OF_SIGNIFICANT_DATA; \ - *_retval = ( Ctype_ ) value; \ + *aResult = ( Ctype_ ) value; \ return rv; \ } @@ -533,7 +533,7 @@ nsVariant::ConvertTo##name_ (const nsDiscriminatedUnion& data, \ double value = tempData.u.mDoubleValue; \ if(value < min_ || value > max_) \ return NS_ERROR_LOSS_OF_SIGNIFICANT_DATA; \ - *_retval = ( Ctype_ ) value; \ + *aResult = ( Ctype_ ) value; \ return (0.0 == fmod(value,1.0)) ? \ rv : NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA; \ }