1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 16:23:39 +02:00

Fix build errors

This commit is contained in:
supremestdoggo 2023-03-17 10:40:18 -04:00
parent a4b75a322d
commit 5c377e0572

View File

@ -60,7 +60,8 @@ string set_foreground(string color) {
} else { } else {
throw new StringException("Invalid color code (must be either two ASCII digits or a hexadecimal code of the form RRGGBB)"); throw new StringException("Invalid color code (must be either two ASCII digits or a hexadecimal code of the form RRGGBB)");
} }
return control_char ~ color; return control_char.idup ~ color;
}
// Generate a string that sets the foreground and background color // Generate a string that sets the foreground and background color
string set_foreground_background(string fg, string bg) { string set_foreground_background(string fg, string bg) {
@ -75,7 +76,7 @@ string set_foreground_background(string fg, string bg) {
} else { } else {
throw new StringException("Invalid color code (must be either two ASCII digits or a hexadecimal code of the form RRGGBB)"); throw new StringException("Invalid color code (must be either two ASCII digits or a hexadecimal code of the form RRGGBB)");
} }
return control_char ~ fg ~ "," ~ bg; return control_char.idup ~ fg ~ "," ~ bg;
} }
// Generates a string that changes the foreground color (except enum) // Generates a string that changes the foreground color (except enum)
@ -92,7 +93,7 @@ string set_foreground_background(simpleColor fg, simpleColor bg) {
// Generate a string that resets the foreground and background colors // Generate a string that resets the foreground and background colors
pragma(inline) pragma(inline)
string reset_fg_bg() {return ascii_color_code;} string reset_fg_bg() {return [ascii_color_code].idup;}
// Format strings with functions // Format strings with functions
pragma(inline) pragma(inline)