- (tableViewImpl.*funcFixed)(index, childMapValue->Get<float>());
- }
- else if(policy == Toolkit::TableView::RELATIVE)
- {
- (tableViewImpl.*funcRelative)(index, childMapValue->Get<float>());
- }
- else if(policy == Toolkit::TableView::FIT)
- {
- (tableViewImpl.*funcFit)(index);
+ switch(policy)
+ {
+ case Toolkit::TableView::FIXED:
+ case Toolkit::TableView::RELATIVE:
+ {
+ Property::Value* childMapValue = childMap->Find("value");
+ float childValue = 0.0f;
+ if(DALI_LIKELY(childMapValue && childMapValue->Get(childValue)))
+ {
+ if(policy == Toolkit::TableView::FIXED)
+ {
+ (tableViewImpl.*funcFixed)(index, childValue);
+ }
+ else // if(policy == Toolkit::TableView::RELATIVE)
+ {
+ (tableViewImpl.*funcRelative)(index, childValue);
+ }
+ }
+ break;
+ }
+ case Toolkit::TableView::FIT:
+ {
+ (tableViewImpl.*funcFit)(index);
+ break;
+ }
+ default:
+ {
+ // do nothing for FILL policy
+ break;
+ }
+ }