Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit accf3e7

Browse files
zachary-trudog-easy
authored andcommitted
Add default cases for view data switch. (#384)
View data switch without default causes compiler warnings. Addition of a default removes these warnings.
1 parent ef10fff commit accf3e7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

opencensus/stats/internal/view_data_impl.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@ ViewDataImpl::Type ViewDataImpl::TypeForDescriptor(
4040
return ViewDataImpl::Type::kDouble;
4141
case MeasureDescriptor::Type::kInt64:
4242
return ViewDataImpl::Type::kInt64;
43+
default:
44+
ABSL_ASSERT(false && "Bad ViewDataImpl type.");
45+
break;
4346
}
4447
case Aggregation::Type::kCount:
4548
return ViewDataImpl::Type::kInt64;
4649
case Aggregation::Type::kDistribution:
4750
return ViewDataImpl::Type::kDistribution;
51+
default:
52+
ABSL_ASSERT(false && "Bad ViewDataImpl type.");
53+
break;
4854
}
4955
case AggregationWindow::Type::kInterval:
5056
return ViewDataImpl::Type::kStatsObject;

0 commit comments

Comments
 (0)