Skip to content

Commit

Permalink
std::variant -> mpark::variant, formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Oct 9, 2023
1 parent ce990d0 commit ade946b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ struct MaskedArrayType {
struct CompatibleTypes {
private:
/**
* std::monostate represents "complete" compatibility, in that nothing has
* mpark::monostate represents "complete" compatibility, in that nothing has
* been determined to be incompatible yet. Once something is either a
* MaskedType or MaskedArrayType, they are considered incompatible with the
* other type.
*/
mpark::variant<std::monostate, MaskedType, MaskedArrayType> _type;
mpark::variant<mpark::monostate, MaskedType, MaskedArrayType> _type;

/**
* Whether the property has encountered a null value. A
Expand Down Expand Up @@ -194,7 +194,7 @@ struct CompatibleTypes {
return false;
}

if (mpark::holds_alternative<std::monostate>(_type)) {
if (mpark::holds_alternative<mpark::monostate>(_type)) {
return true;
}

Expand All @@ -211,7 +211,7 @@ struct CompatibleTypes {
return false;
}

if (mpark::holds_alternative<std::monostate>(_type)) {
if (mpark::holds_alternative<mpark::monostate>(_type)) {
return true;
}

Expand All @@ -224,7 +224,7 @@ struct CompatibleTypes {
* happens when a CompatibleTypes is initialized and never modified.
*/
bool isFullyCompatible() const noexcept {
return mpark::holds_alternative<std::monostate>(_type);
return mpark::holds_alternative<mpark::monostate>(_type);
}

/**
Expand All @@ -240,7 +240,7 @@ struct CompatibleTypes {
return mpark::get<MaskedArrayType>(_type).isIncompatible();
}

// std::monostate means compatibility with all types.
// mpark::monostate means compatibility with all types.
return false;
}

Expand Down Expand Up @@ -290,7 +290,7 @@ struct CompatibleTypes {
* Merges another CompatibleTypes into this one.
*/
void operator&=(const CompatibleTypes& inTypes) noexcept {
if (mpark::holds_alternative<std::monostate>(inTypes._type)) {
if (mpark::holds_alternative<mpark::monostate>(inTypes._type)) {
// The other CompatibleTypes is compatible with everything, so it does not
// change this one.
} else
Expand Down
8 changes: 6 additions & 2 deletions CesiumGltf/include/CesiumGltf/PropertyTablePropertyView.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ class PropertyTablePropertyView<ElementType, false>
* @param classProperty The {@link ClassProperty} this property conforms to.
* @param size The number of elements in the property table specified by {@link PropertyTable::count}
*/
PropertyTablePropertyView(const ClassProperty& classProperty, int64_t size) noexcept
PropertyTablePropertyView(
const ClassProperty& classProperty,
int64_t size) noexcept
: PropertyView<ElementType, false>(classProperty),
_values{},
_size{0},
Expand Down Expand Up @@ -558,7 +560,9 @@ class PropertyTablePropertyView<ElementType, true>
* @param classProperty The {@link ClassProperty} this property conforms to.
* @param size The number of elements in the property table specified by {@link PropertyTable::count}
*/
PropertyTablePropertyView(const ClassProperty& classProperty, int64_t size) noexcept
PropertyTablePropertyView(
const ClassProperty& classProperty,
int64_t size) noexcept
: PropertyView<ElementType, true>(classProperty),
_values{},
_size{0},
Expand Down

0 comments on commit ade946b

Please sign in to comment.