mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 15:07:45 +00:00
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.
This commit is contained in:
parent
4459cb33ed
commit
e1685b6b69
1 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
||||||
#include <LibCore/ArgsParser.h>
|
#include <LibCore/ArgsParser.h>
|
||||||
#include <LibCore/File.h>
|
#include <LibCore/File.h>
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
struct Time {
|
struct Time {
|
||||||
i8 hour { 0 };
|
i8 hour { 0 };
|
||||||
u8 minute { 0 };
|
u8 minute { 0 };
|
||||||
|
@ -250,6 +252,8 @@ namespace TimeZone {
|
||||||
VERIFY(file.write(generator.as_string_view()));
|
VERIFY(file.write(generator.as_string_view()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
{
|
{
|
||||||
StringView generated_header_path;
|
StringView generated_header_path;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue