assert.cpp 403 B

123456789101112131415161718
  1. // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "common/assert.h"
  4. #include "common/common_funcs.h"
  5. #include "common/settings.h"
  6. void assert_fail_impl() {
  7. if (Settings::values.use_debug_asserts) {
  8. Crash();
  9. }
  10. }
  11. [[noreturn]] void unreachable_impl() {
  12. Crash();
  13. throw std::runtime_error("Unreachable code");
  14. }