diff --git a/Userland/Libraries/LibGfx/FourCC.h b/Userland/Libraries/LibGfx/FourCC.h new file mode 100644 index 0000000000..2b2bdb9a3a --- /dev/null +++ b/Userland/Libraries/LibGfx/FourCC.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2023, Sam Atkins + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +namespace Gfx { + +struct FourCC { + constexpr FourCC(char const* name) + { + cc[0] = name[0]; + cc[1] = name[1]; + cc[2] = name[2]; + cc[3] = name[3]; + } + + bool operator==(FourCC const&) const = default; + bool operator!=(FourCC const&) const = default; + + char cc[4]; +}; + +} diff --git a/Userland/Libraries/LibGfx/ImageFormats/ILBMLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/ILBMLoader.cpp index 0a0501b491..80e141dac9 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/ILBMLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/ILBMLoader.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include namespace Gfx { diff --git a/Userland/Libraries/LibGfx/ImageFormats/ImageDecoder.h b/Userland/Libraries/LibGfx/ImageFormats/ImageDecoder.h index aa15dfeb88..5362b3c4ed 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/ImageDecoder.h +++ b/Userland/Libraries/LibGfx/ImageFormats/ImageDecoder.h @@ -84,19 +84,4 @@ private: NonnullOwnPtr mutable m_plugin; }; -struct FourCC { - constexpr FourCC(char const* name) - { - cc[0] = name[0]; - cc[1] = name[1]; - cc[2] = name[2]; - cc[3] = name[3]; - } - - bool operator==(FourCC const&) const = default; - bool operator!=(FourCC const&) const = default; - - char cc[4]; -}; - } diff --git a/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp index ae03df8508..c7333d0422 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include