uiacceltk/hitchcock/coretoolkit/src/HuiGridLayout.cpp
branchGCC_SURGE
changeset 36 a7cff2fbd499
parent 0 15bf7259bb7c
equal deleted inserted replaced
33:bb0f3b79fdbe 36:a7cff2fbd499
   271     {
   271     {
   272     TAxis& axis = iGridLayoutData->iAxes[EHuiGridColumn];
   272     TAxis& axis = iGridLayoutData->iAxes[EHuiGridColumn];
   273     axis.iWeights.Reset();
   273     axis.iWeights.Reset();
   274     for(TInt i = 0; i < aWeights.Count(); ++i)
   274     for(TInt i = 0; i < aWeights.Count(); ++i)
   275         {
   275         {
   276         THuiMetric weight(TReal32(aWeights[i]), EHuiUnitWeight);
   276 	TInt weight_value(aWeights[i]); //evaluate this first and then use the value to initialize TReal (this fixes gcc 4.4.1 issue)
       
   277         THuiMetric weight(TReal32(weight_value), EHuiUnitWeight); 
   277         User::LeaveIfError(axis.iWeights.Append(weight));
   278         User::LeaveIfError(axis.iWeights.Append(weight));
   278         }
   279         }
   279     }
   280     }
   280     
   281     
   281 EXPORT_C void CHuiGridLayout::SetRowsL(const RArray<TInt>& aWeights)
   282 EXPORT_C void CHuiGridLayout::SetRowsL(const RArray<TInt>& aWeights)
   282     {
   283     {
   283     TAxis& axis = iGridLayoutData->iAxes[EHuiGridRow];
   284     TAxis& axis = iGridLayoutData->iAxes[EHuiGridRow];
   284     axis.iWeights.Reset();
   285     axis.iWeights.Reset();
   285     for(TInt i = 0; i < aWeights.Count(); ++i)
   286     for(TInt i = 0; i < aWeights.Count(); ++i)
   286         {
   287         {
   287         THuiMetric weight(TReal32(aWeights[i]), EHuiUnitWeight);
   288         TInt weight_value(aWeights[i]); //evaluate this first and then use the value to initialize TReal (this fixes gcc 4.4.1 issue)
       
   289 	THuiMetric weight(TReal32(weight_value), EHuiUnitWeight); 
   288         User::LeaveIfError(axis.iWeights.Append(weight));
   290         User::LeaveIfError(axis.iWeights.Append(weight));
   289         }
   291         }
   290     }
   292     }
   291 
   293 
   292 EXPORT_C void CHuiGridLayout::FillWeightsL(THuiGridDimension aDim, TInt aCount, const THuiMetric& aWeight)
   294 EXPORT_C void CHuiGridLayout::FillWeightsL(THuiGridDimension aDim, TInt aCount, const THuiMetric& aWeight)