Compare commits
No commits in common. "b316e3b3b7a9fa9890e66f2b6218b5ba7190fdfe" and "59765aa3344d4005147088e6c4767ee19fbba6a7" have entirely different histories.
b316e3b3b7
...
59765aa334
@ -118,12 +118,10 @@ static bool g_check_already_failed = false;
|
||||
|
||||
[[noreturn]] bool __check_failed(const char* file, const char* line, const char* func, const char* expr)
|
||||
{
|
||||
CPU::disable_interrupts();
|
||||
if (!g_check_already_failed)
|
||||
{ // Avoid endlessly failing when trying to report a failed check.
|
||||
g_check_already_failed = true;
|
||||
kerrorln("ERROR: Check failed at %s:%s, in %s: %s", file, line, func, expr);
|
||||
CPU::print_stack_trace();
|
||||
}
|
||||
CPU::efficient_halt();
|
||||
}
|
@ -22,7 +22,11 @@ class OwnedStringView
|
||||
return m_length;
|
||||
}
|
||||
|
||||
const char& operator[](usize) const;
|
||||
const char& operator[](usize index) const
|
||||
{
|
||||
expect(index < m_length, "OwnedStringView: index out of range");
|
||||
return m_string[index];
|
||||
}
|
||||
|
||||
private:
|
||||
char* m_string{nullptr};
|
||||
|
@ -34,9 +34,3 @@ Result<OwnedStringView> OwnedStringView::clone() const
|
||||
|
||||
return OwnedStringView{c_str};
|
||||
}
|
||||
|
||||
const char& OwnedStringView::operator[](usize index) const
|
||||
{
|
||||
expect(index < m_length, "index out of range");
|
||||
return m_string[index];
|
||||
}
|
Loading…
Reference in New Issue
Block a user