mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
LibLine: Switch all files to use east-const
This commit is contained in:
parent
2338d5fcda
commit
4458cc249e
10 changed files with 62 additions and 62 deletions
|
@ -15,7 +15,7 @@ namespace Line {
|
|||
|
||||
class Style {
|
||||
public:
|
||||
bool operator==(const Style&) const = default;
|
||||
bool operator==(Style const&) const = default;
|
||||
|
||||
enum class XtermColor : int {
|
||||
Default = 9,
|
||||
|
@ -39,7 +39,7 @@ public:
|
|||
struct ItalicTag {
|
||||
};
|
||||
struct Color {
|
||||
bool operator==(const Color&) const = default;
|
||||
bool operator==(Color const&) const = default;
|
||||
|
||||
explicit Color(XtermColor color)
|
||||
: m_xterm_color(color)
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
};
|
||||
|
||||
struct Hyperlink {
|
||||
bool operator==(const Hyperlink&) const = default;
|
||||
bool operator==(Hyperlink const&) const = default;
|
||||
|
||||
explicit Hyperlink(StringView link)
|
||||
: m_link(link)
|
||||
|
@ -113,7 +113,7 @@ public:
|
|||
|
||||
// Prepare for the horror of templates.
|
||||
template<typename T, typename... Rest>
|
||||
Style(const T& style_arg, Rest... rest)
|
||||
Style(T const& style_arg, Rest... rest)
|
||||
: Style(rest...)
|
||||
{
|
||||
set(style_arg);
|
||||
|
@ -126,14 +126,14 @@ public:
|
|||
return { Foreground(XtermColor::Default), Background(XtermColor::Default), Hyperlink("") };
|
||||
}
|
||||
|
||||
Style unified_with(const Style& other, bool prefer_other = true) const
|
||||
Style unified_with(Style const& other, bool prefer_other = true) const
|
||||
{
|
||||
Style style = *this;
|
||||
style.unify_with(other, prefer_other);
|
||||
return style;
|
||||
}
|
||||
|
||||
void unify_with(const Style&, bool prefer_other = false);
|
||||
void unify_with(Style const&, bool prefer_other = false);
|
||||
|
||||
bool underline() const { return m_underline; }
|
||||
bool bold() const { return m_bold; }
|
||||
|
@ -142,13 +142,13 @@ public:
|
|||
Foreground foreground() const { return m_foreground; }
|
||||
Hyperlink hyperlink() const { return m_hyperlink; }
|
||||
|
||||
void set(const ItalicTag&) { m_italic = true; }
|
||||
void set(const BoldTag&) { m_bold = true; }
|
||||
void set(const UnderlineTag&) { m_underline = true; }
|
||||
void set(const Background& bg) { m_background = bg; }
|
||||
void set(const Foreground& fg) { m_foreground = fg; }
|
||||
void set(const Hyperlink& link) { m_hyperlink = link; }
|
||||
void set(const AnchoredTag&) { m_is_anchored = true; }
|
||||
void set(ItalicTag const&) { m_italic = true; }
|
||||
void set(BoldTag const&) { m_bold = true; }
|
||||
void set(UnderlineTag const&) { m_underline = true; }
|
||||
void set(Background const& bg) { m_background = bg; }
|
||||
void set(Foreground const& fg) { m_foreground = fg; }
|
||||
void set(Hyperlink const& link) { m_hyperlink = link; }
|
||||
void set(AnchoredTag const&) { m_is_anchored = true; }
|
||||
|
||||
bool is_anchored() const { return m_is_anchored; }
|
||||
bool is_empty() const { return m_is_empty; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue