mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
AK: Make string-to-number conversion helpers return Optional
Get rid of the weird old signature: - int StringType::to_int(bool& ok) const And replace it with sensible new signature: - Optional<int> StringType::to_int() const
This commit is contained in:
parent
15f4043a7a
commit
fdfda6dec2
55 changed files with 354 additions and 455 deletions
|
@ -72,8 +72,7 @@ TEST_CASE(order)
|
|||
}
|
||||
|
||||
for (int i = 0; i < 10000; ++i) {
|
||||
bool ok;
|
||||
EXPECT_EQ(strings.dequeue().to_int(ok), i);
|
||||
EXPECT_EQ(strings.dequeue().to_int().value(), i);
|
||||
}
|
||||
|
||||
EXPECT(strings.is_empty());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue