Skip to content

Commit

Permalink
Fix test failures by eliminating some pass-by-value.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Oct 3, 2023
1 parent addacde commit d09630a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Source/CesiumRuntime/Private/CesiumPropertyTableProperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ propertyTablePropertyCallback(const std::any& property, Callback&& callback) {
template <bool Normalized, typename TResult, typename Callback>
TResult scalarPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
switch (valueType.ComponentType) {
case ECesiumMetadataComponentType::Int8:
Expand Down Expand Up @@ -133,7 +133,7 @@ TResult scalarPropertyTablePropertyCallback(
template <bool Normalized, typename TResult, typename Callback>
TResult scalarArrayPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
switch (valueType.ComponentType) {
case ECesiumMetadataComponentType::Int8:
Expand Down Expand Up @@ -218,7 +218,7 @@ TResult scalarArrayPropertyTablePropertyCallback(
template <glm::length_t N, bool Normalized, typename TResult, typename Callback>
TResult vecNPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
switch (valueType.ComponentType) {
case ECesiumMetadataComponentType::Int8:
Expand Down Expand Up @@ -302,7 +302,7 @@ TResult vecNPropertyTablePropertyCallback(
template <bool Normalized, typename TResult, typename Callback>
TResult vecNPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
if (valueType.Type == ECesiumMetadataType::Vec2) {
return vecNPropertyTablePropertyCallback<2, Normalized, TResult, Callback>(
Expand Down Expand Up @@ -346,7 +346,7 @@ TResult vecNPropertyTablePropertyCallback(
template <glm::length_t N, bool Normalized, typename TResult, typename Callback>
TResult vecNArrayPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
switch (valueType.ComponentType) {
case ECesiumMetadataComponentType::Int8:
Expand Down Expand Up @@ -431,7 +431,7 @@ TResult vecNArrayPropertyTablePropertyCallback(
template <bool Normalized, typename TResult, typename Callback>
TResult vecNArrayPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
if (valueType.Type == ECesiumMetadataType::Vec2) {
return vecNArrayPropertyTablePropertyCallback<
Expand Down Expand Up @@ -477,7 +477,7 @@ TResult vecNArrayPropertyTablePropertyCallback(
template <glm::length_t N, bool Normalized, typename TResult, typename Callback>
TResult matNPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
switch (valueType.ComponentType) {
case ECesiumMetadataComponentType::Int8:
Expand Down Expand Up @@ -561,7 +561,7 @@ TResult matNPropertyTablePropertyCallback(
template <bool Normalized, typename TResult, typename Callback>
TResult matNPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
if (valueType.Type == ECesiumMetadataType::Mat2) {
return matNPropertyTablePropertyCallback<2, Normalized, TResult, Callback>(
Expand Down Expand Up @@ -605,7 +605,7 @@ TResult matNPropertyTablePropertyCallback(
template <glm::length_t N, bool Normalized, typename TResult, typename Callback>
TResult matNArrayPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
switch (valueType.ComponentType) {
case ECesiumMetadataComponentType::Int8:
Expand Down Expand Up @@ -690,7 +690,7 @@ TResult matNArrayPropertyTablePropertyCallback(
template <bool Normalized, typename TResult, typename Callback>
TResult matNArrayPropertyTablePropertyCallback(
const std::any& property,
FCesiumMetadataValueType valueType,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
if (valueType.Type == ECesiumMetadataType::Mat2) {
return matNArrayPropertyTablePropertyCallback<
Expand Down Expand Up @@ -721,8 +721,8 @@ TResult matNArrayPropertyTablePropertyCallback(

template <bool Normalized, typename TResult, typename Callback>
TResult arrayPropertyTablePropertyCallback(
std::any property,
FCesiumMetadataValueType valueType,
const std::any& property,
const FCesiumMetadataValueType& valueType,
Callback&& callback) {
switch (valueType.Type) {
case ECesiumMetadataType::Scalar:
Expand Down Expand Up @@ -763,8 +763,8 @@ TResult arrayPropertyTablePropertyCallback(

template <typename TResult, typename Callback>
TResult propertyTablePropertyCallback(
std::any property,
FCesiumMetadataValueType valueType,
const std::any& property,
const FCesiumMetadataValueType& valueType,
bool normalized,
Callback&& callback) {
if (valueType.bIsArray) {
Expand Down

0 comments on commit d09630a

Please sign in to comment.