diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-08-18 13:31:47 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-08-18 13:31:47 +0200 |
| commit | 4f77ad5d019618893c59a0f8d5bfa6b98e50a3be (patch) | |
| tree | d9e01460ecf94a491be476fbca76b6608276d967 /boot/evaluator.cc | |
| parent | 4b7c87a9b53f5317e9f7982bd779d53a66960bdc (diff) | |
| download | elna-4f77ad5d019618893c59a0f8d5bfa6b98e50a3be.tar.gz | |
Make Int and Word aliases to fixed-size types
Diffstat (limited to 'boot/evaluator.cc')
| -rw-r--r-- | boot/evaluator.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/boot/evaluator.cc b/boot/evaluator.cc index b37d1fa..d43ef11 100644 --- a/boot/evaluator.cc +++ b/boot/evaluator.cc @@ -245,7 +245,7 @@ namespace elna::boot { return constant_value{ boolean_subject->value }; } - else if (auto *character_subject = subject.is_a<unsigned char>()) + else if (auto *character_subject = subject.is_a<std::uint32_t>()) { return constant_value{ character_subject->value }; } @@ -686,7 +686,7 @@ namespace elna::boot } else if constexpr (std::is_same_v<T, double> || std::is_same_v<T, bool> - || std::is_same_v<T, unsigned char>) + || std::is_same_v<T, std::uint32_t>) { return integer_literal::from(static_cast<std::ptrdiff_t>(source_value)); } @@ -716,7 +716,7 @@ namespace elna::boot } else if constexpr (std::is_same_v<T, double> || std::is_same_v<T, bool> - || std::is_same_v<T, unsigned char>) + || std::is_same_v<T, std::uint32_t>) { return integer_literal::from(static_cast<std::size_t>(source_value)); } @@ -809,7 +809,7 @@ namespace elna::boot } if (is_primitive_type(resolved, "Char")) { - return constant_value{ static_cast<unsigned char>(0) }; + return constant_value{ static_cast<std::uint32_t>(0) }; } if (is_primitive_type(resolved, "Bool")) { @@ -851,7 +851,7 @@ namespace elna::boot } if (is_primitive_type(resolved, "Char")) { - return constant_value{ std::numeric_limits<unsigned char>::max() }; + return constant_value{ std::numeric_limits<std::uint32_t>::max() }; } if (is_primitive_type(resolved, "Bool")) { |
