mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 10:50:49 +00:00
Everywhere: Run clang-format
The following command was used to clang-format these files: clang-format-19 -i $(find . \ -not \( -path "./\.*" -prune \) \ -not \( -path "./Build/*" -prune \) \ -not \( -path "./Toolchain/*" -prune \) \ -type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
This commit is contained in:
parent
66732d2203
commit
27478ec7d4
Notes:
github-actions[bot]
2024-12-28 13:40:37 +00:00
Author: https://github.com/trflynn89
Commit: 27478ec7d4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3067
57 changed files with 160 additions and 140 deletions
|
@ -60,7 +60,7 @@ NonnullRefPtr<ScaledFont> Typeface::scaled_font(float point_size) const
|
|||
hb_face_t* Typeface::harfbuzz_typeface() const
|
||||
{
|
||||
if (!m_harfbuzz_blob)
|
||||
m_harfbuzz_blob = hb_blob_create(reinterpret_cast<char const*>(buffer().data()), buffer().size(), HB_MEMORY_MODE_READONLY, nullptr, [](void*) {});
|
||||
m_harfbuzz_blob = hb_blob_create(reinterpret_cast<char const*>(buffer().data()), buffer().size(), HB_MEMORY_MODE_READONLY, nullptr, [](void*) { });
|
||||
if (!m_harfbuzz_face)
|
||||
m_harfbuzz_face = hb_face_create(m_harfbuzz_blob, ttc_index());
|
||||
return m_harfbuzz_face;
|
||||
|
|
|
@ -64,9 +64,9 @@ SkTypeface const* TypefaceSkia::sk_typeface() const
|
|||
TypefaceSkia::TypefaceSkia(NonnullOwnPtr<Impl> impl, ReadonlyBytes buffer, int ttc_index)
|
||||
: m_impl(move(impl))
|
||||
, m_buffer(buffer)
|
||||
, m_ttc_index(ttc_index) {
|
||||
|
||||
};
|
||||
, m_ttc_index(ttc_index)
|
||||
{
|
||||
}
|
||||
|
||||
u32 TypefaceSkia::glyph_count() const
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
virtual void fill_main_tags() const {};
|
||||
virtual void fill_main_tags() const { }
|
||||
|
||||
mutable HashMap<StringView, String> m_main_tags;
|
||||
};
|
||||
|
|
|
@ -62,7 +62,7 @@ ErrorOr<void> JPEGLoadingContext::decode()
|
|||
|
||||
source_manager.next_input_byte = data.data();
|
||||
source_manager.bytes_in_buffer = data.size();
|
||||
source_manager.init_source = [](j_decompress_ptr) {};
|
||||
source_manager.init_source = [](j_decompress_ptr) { };
|
||||
source_manager.fill_input_buffer = [](j_decompress_ptr) -> boolean { return false; };
|
||||
source_manager.skip_input_data = [](j_decompress_ptr context, long num_bytes) {
|
||||
if (num_bytes > static_cast<long>(context->src->bytes_in_buffer)) {
|
||||
|
@ -73,7 +73,7 @@ ErrorOr<void> JPEGLoadingContext::decode()
|
|||
context->src->bytes_in_buffer -= num_bytes;
|
||||
};
|
||||
source_manager.resync_to_restart = jpeg_resync_to_restart;
|
||||
source_manager.term_source = [](j_decompress_ptr) {};
|
||||
source_manager.term_source = [](j_decompress_ptr) { };
|
||||
|
||||
cinfo.src = &source_manager;
|
||||
|
||||
|
|
|
@ -48,8 +48,8 @@ struct MemoryDestinationManager : public jpeg_destination_mgr {
|
|||
|
||||
ErrorOr<void> JPEGWriter::encode_impl(Stream& stream, auto const& bitmap, Options const& options, ColorSpace color_space)
|
||||
{
|
||||
struct jpeg_compress_struct cinfo { };
|
||||
struct jpeg_error_mgr jerr { };
|
||||
struct jpeg_compress_struct cinfo {};
|
||||
struct jpeg_error_mgr jerr {};
|
||||
|
||||
cinfo.err = jpeg_std_error(&jerr);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ private:
|
|||
ALWAYS_INLINE ErrorOr<void> CanonicalCode::write_symbol(LittleEndianOutputBitStream& bit_stream, u32 symbol) const
|
||||
{
|
||||
TRY(m_code.visit(
|
||||
[&](u32 single_code) __attribute__((always_inline))->ErrorOr<void> { VERIFY(symbol == single_code); return {}; },
|
||||
[&](u32 single_code) __attribute__((always_inline)) -> ErrorOr<void> { VERIFY(symbol == single_code); return {}; },
|
||||
[&](Compress::CanonicalCode const& code) __attribute__((always_inline)) { return code.write_symbol(bit_stream, symbol); }));
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
virtual size_t width() const = 0;
|
||||
virtual size_t height() const = 0;
|
||||
|
||||
virtual ~MetalTexture() {};
|
||||
virtual ~MetalTexture() { }
|
||||
};
|
||||
|
||||
class MetalContext : public RefCounted<MetalContext> {
|
||||
|
@ -33,7 +33,7 @@ public:
|
|||
|
||||
virtual OwnPtr<MetalTexture> create_texture_from_iosurface(Core::IOSurfaceHandle const&) = 0;
|
||||
|
||||
virtual ~MetalContext() {};
|
||||
virtual ~MetalContext() { }
|
||||
};
|
||||
|
||||
RefPtr<MetalContext> get_metal_context();
|
||||
|
|
|
@ -37,10 +37,10 @@ public:
|
|||
static RefPtr<Gfx::SkiaBackendContext> create_metal_context(MetalContext&);
|
||||
#endif
|
||||
|
||||
SkiaBackendContext() {};
|
||||
virtual ~SkiaBackendContext() {};
|
||||
SkiaBackendContext() { }
|
||||
virtual ~SkiaBackendContext() { }
|
||||
|
||||
virtual void flush_and_submit(SkSurface*) {};
|
||||
virtual void flush_and_submit(SkSurface*) { }
|
||||
virtual GrDirectContext* sk_context() const = 0;
|
||||
|
||||
virtual MetalContext& metal_context() = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue