Bug 2959 - GCC compilation issues in sf/mw/uiaccelerator GCC_SURGE
authorSalvatore Rinaldo <salvatorer@symbian.org>
Tue, 15 Jun 2010 14:05:48 +0100
branchGCC_SURGE
changeset 36 a7cff2fbd499
parent 33 bb0f3b79fdbe
child 37 8651eaddcb0b
Bug 2959 - GCC compilation issues in sf/mw/uiaccelerator
uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectParser.cpp
uiacceltk/hitchcock/coretoolkit/src/HuiGridLayout.cpp
uiacceltk/hitchcock/goommonitor/inc/tracedefs.h
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectParser.cpp	Fri Jun 11 16:26:54 2010 +0100
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectParser.cpp	Tue Jun 15 14:05:48 2010 +0100
@@ -729,7 +729,7 @@
             TReal32 time = ParseFloatAttributeL(aNode, KLitAt);
             TReal32 aux1 = ParseFloatAttributeL(aNode, KLitAux1, EFalse);
             TReal32 aux2 = ParseFloatAttributeL(aNode, KLitAux2, EFalse);
-            VALUE_TYPE value = ParseAnimationKeyFrameValueL<PARAM_TYPE::ValueType, TIMELINE_TYPE>(aNode->FirstChild(), aTimeLine);
+            VALUE_TYPE value = ParseAnimationKeyFrameValueL<typename PARAM_TYPE::ValueType, TIMELINE_TYPE>(aNode->FirstChild(), aTimeLine);
             TRAPD(err, aTimeLine.AppendKeyFrameL(time, value, aux1, aux2));
             if (err != KErrNone)
                 {
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiGridLayout.cpp	Fri Jun 11 16:26:54 2010 +0100
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiGridLayout.cpp	Tue Jun 15 14:05:48 2010 +0100
@@ -273,7 +273,8 @@
     axis.iWeights.Reset();
     for(TInt i = 0; i < aWeights.Count(); ++i)
         {
-        THuiMetric weight(TReal32(aWeights[i]), EHuiUnitWeight);
+	TInt weight_value(aWeights[i]); //evaluate this first and then use the value to initialize TReal (this fixes gcc 4.4.1 issue)
+        THuiMetric weight(TReal32(weight_value), EHuiUnitWeight); 
         User::LeaveIfError(axis.iWeights.Append(weight));
         }
     }
@@ -284,7 +285,8 @@
     axis.iWeights.Reset();
     for(TInt i = 0; i < aWeights.Count(); ++i)
         {
-        THuiMetric weight(TReal32(aWeights[i]), EHuiUnitWeight);
+        TInt weight_value(aWeights[i]); //evaluate this first and then use the value to initialize TReal (this fixes gcc 4.4.1 issue)
+	THuiMetric weight(TReal32(weight_value), EHuiUnitWeight); 
         User::LeaveIfError(axis.iWeights.Append(weight));
         }
     }
--- a/uiacceltk/hitchcock/goommonitor/inc/tracedefs.h	Fri Jun 11 16:26:54 2010 +0100
+++ b/uiacceltk/hitchcock/goommonitor/inc/tracedefs.h	Tue Jun 15 14:05:48 2010 +0100
@@ -34,6 +34,6 @@
 /**
 * Prefix macro for strings
 */
-#define _PREFIX_CHAR( aMsg ) (const char*)"[GOOM]: " ##aMsg
+#define _PREFIX_CHAR( aMsg ) (const char*)"[GOOM]: " #aMsg
 
 #endif // TRACEDEFS_H