mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
Use modern C++ attributes instead of __attribute__ voodoo.
This is quite nice, although I wish [[gnu::always_inline]] implied inline. Also "gnu::" is kind of a wart, but whatcha gonna do.
This commit is contained in:
parent
fbcc8ab840
commit
022f7790db
Notes:
sideshowbarker
2024-07-19 15:42:33 +09:00
Author: https://github.com/awesomekling
Commit: 022f7790db
34 changed files with 99 additions and 124 deletions
|
@ -291,7 +291,7 @@ void Painter::blit(const Point& position, const GraphicsBitmap& source, const Re
|
|||
}
|
||||
}
|
||||
|
||||
FLATTEN void Painter::draw_glyph(const Point& point, char ch, Color color)
|
||||
[[gnu::flatten]] void Painter::draw_glyph(const Point& point, char ch, Color color)
|
||||
{
|
||||
draw_bitmap(point, font().glyph_bitmap(ch), color);
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ void Painter::set_pixel(const Point& p, Color color)
|
|||
m_target->scanline(point.y())[point.x()] = color.value();
|
||||
}
|
||||
|
||||
ALWAYS_INLINE void Painter::set_pixel_with_draw_op(dword& pixel, const Color& color)
|
||||
[[gnu::always_inline]] void Painter::set_pixel_with_draw_op(dword& pixel, const Color& color)
|
||||
{
|
||||
if (m_draw_op == DrawOp::Copy)
|
||||
pixel = color.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue