diff options
author | Michel Hermier <michel.hermier@gmail.com> | 2022-01-10 15:20:48 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-10 15:57:59 +0100 |
commit | e1685b6b69453d2e9e0485ed1f7ced3a23f7cbe2 (patch) | |
tree | 39bfd21ee4a2efe1ddd46f34882242099e306c36 /Meta | |
parent | 4459cb33ed320a7d48e7b134ad96a634443faab2 (diff) | |
download | serenity-e1685b6b69453d2e9e0485ed1f7ced3a23f7cbe2.zip |
Lagom: Avoid declaring `Time` in the global namespace
When compiled using clang, an ambiguity error is detected between
`class AK::Time` aliased to `::Time` and the `struct ::Time` provided
in `GenerateTimeZoneData.cpp`. Solve this by moving most of the code in
an anonymous namespace.
Diffstat (limited to 'Meta')
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp b/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp index f5cd8fbbde..f96b3e752a 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp @@ -13,6 +13,8 @@ #include <LibCore/ArgsParser.h> #include <LibCore/File.h> +namespace { + struct Time { i8 hour { 0 }; u8 minute { 0 }; @@ -250,6 +252,8 @@ namespace TimeZone { VERIFY(file.write(generator.as_string_view())); } +} + ErrorOr<int> serenity_main(Main::Arguments arguments) { StringView generated_header_path; |