Skip to content

Commit

Permalink
Fix bad rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
  • Loading branch information
Caellian committed Apr 23, 2024
1 parent f34b5dd commit e629fc3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/colours.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include "logging.h"

#include <optional>

Colour Colour::from_argb32(uint32_t argb) {
Colour out;
out.alpha = argb >> 24;
Expand Down Expand Up @@ -111,14 +113,8 @@ Colour parse_color(const std::string &color) {
std::optional<Colour> value_##name = name(color); \
if (value_##name.has_value()) { return value_##name.value(); }

std::optional<Colour> value_parse_color_name = parse_color_name(color);
if (value_parse_color_name.has_value()) {
return value_parse_color_name.value();
}
std::optional<Colour> value_parse_hex_color = parse_hex_color(color);
if (value_parse_hex_color.has_value()) {
return value_parse_hex_color.value();
}
TRY_PARSER(parse_color_name)
TRY_PARSER(parse_hex_color)

#undef TRY_PARSER

Expand Down

0 comments on commit e629fc3

Please sign in to comment.