Deprecate treating strings as numbers (#1780)

This commit is contained in:
Rangi
2025-08-06 10:13:22 -04:00
committed by GitHub
parent 34d99b273c
commit a4a830776b
14 changed files with 34 additions and 9 deletions

View File

@@ -166,6 +166,7 @@ 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");
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.