mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Tell people to use character literals or CHARVAL instead of strings as numbers
This commit is contained in:
@@ -186,7 +186,10 @@ uint32_t act_CharToNum(std::string const &str) {
|
||||
}
|
||||
|
||||
uint32_t act_StringToNum(std::string const &str) {
|
||||
warning(WARNING_OBSOLETE, "Treating strings as numbers is deprecated");
|
||||
warning(
|
||||
WARNING_OBSOLETE,
|
||||
"Treating strings as numbers is deprecated; use character literals or `CHARVAL` instead"
|
||||
);
|
||||
if (std::vector<int32_t> units = charmap_Convert(str); units.size() == 1) {
|
||||
// The string is a single character with a single unit value,
|
||||
// which can be used directly as a number.
|
||||
|
||||
Reference in New Issue
Block a user