Skip to content

Commit

Permalink
Reflection: Fix compile error due to a GCC bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagghiu committed Jun 2, 2024
1 parent 72354c8 commit a941264
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Libraries/Reflection/ReflectionSchemaCompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct SchemaCompiler

SchemaBuilder container(result.types.values, MAX_TOTAL_TYPES);

#if SC_COMPILER_GCC && __GNUC__ <= 11 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
#if SC_COMPILER_GCC && __GNUC__ <= 13 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
ArrayWithSize<TypeStringView, MAX_LINK_BUFFER_SIZE> alreadyVisitedTypes;
#else
ArrayWithSize<TypeBuildFunction, MAX_LINK_BUFFER_SIZE> alreadyVisitedTypes;
Expand All @@ -104,7 +104,7 @@ struct SchemaCompiler
if (not type.typeInfo.isPrimitiveType() and type.typeInfo.needsLinking())
{
uint32_t outIndex = 0;
#if SC_COMPILER_GCC && __GNUC__ <= 11 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
#if SC_COMPILER_GCC && __GNUC__ <= 13 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
if (alreadyVisitedTypes.contains(type.typeName, &outIndex))
#else
if (alreadyVisitedTypes.contains(type.typeBuild, &outIndex))
Expand All @@ -119,7 +119,7 @@ struct SchemaCompiler
return {};
if (not alreadyVisitedLinkID.push_back(result.types.size))
return {};
#if SC_COMPILER_GCC && __GNUC__ <= 11 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
#if SC_COMPILER_GCC && __GNUC__ <= 13 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77911
if (not alreadyVisitedTypes.push_back(type.typeName))
#else
if (not alreadyVisitedTypes.push_back(type.typeBuild))
Expand Down

0 comments on commit a941264

Please sign in to comment.