diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-10-29 14:49:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 14:49:26 +0800 |
| commit | f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch) | |
| tree | ea1d61342cd29368e19135000ec2948813096205 /source/slang/slang-profile.cpp | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
Diffstat (limited to 'source/slang/slang-profile.cpp')
| -rw-r--r-- | source/slang/slang-profile.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/source/slang/slang-profile.cpp b/source/slang/slang-profile.cpp index 9b7112b1f..2b013415d 100644 --- a/source/slang/slang-profile.cpp +++ b/source/slang/slang-profile.cpp @@ -1,15 +1,17 @@ // slang-profile.cpp #include "slang-profile.h" -namespace Slang { +namespace Slang +{ ProfileFamily getProfileFamily(ProfileVersion version) { - switch( version ) + switch (version) { default: return ProfileFamily::Unknown; -#define PROFILE_VERSION(TAG, FAMILY) case ProfileVersion::TAG: return ProfileFamily::FAMILY; +#define PROFILE_VERSION(TAG, FAMILY) \ + case ProfileVersion::TAG: return ProfileFamily::FAMILY; #include "slang-profile-defs.h" } } @@ -23,26 +25,22 @@ bool isRaytracingStage(Stage inStage) case Stage::Intersection: case Stage::ClosestHit: case Stage::Callable: - case Stage::AnyHit: - return true; - default: - return false; + case Stage::AnyHit: return true; + default: return false; } } const char* getStageName(Stage stage) { - switch(stage) + switch (stage) { #define PROFILE_STAGE(ID, NAME, ENUM) \ case Stage::ID: return #NAME; #include "slang-profile-defs.h" - default: - return nullptr; + default: return nullptr; } - } void printDiagnosticArg(StringBuilder& sb, Stage val) @@ -56,4 +54,4 @@ void printDiagnosticArg(StringBuilder& sb, ProfileVersion val) } -} +} // namespace Slang |
