Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
This commit is contained in:
parent
168eb27aee
commit
ef24e72b26
88 changed files with 135 additions and 217 deletions
|
@ -2,7 +2,7 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/ac_u.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/act_u.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/am_app.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/am_net.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/am_sys.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/apt_a.h"
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ void Initialize(Service::Interface* self) {
|
|||
notification_event->Clear();
|
||||
pause_event->Signal(); // Fire start event
|
||||
|
||||
_assert_msg_(KERNEL, (nullptr != lock), "Cannot initialize without lock");
|
||||
ASSERT_MSG((nullptr != lock), "Cannot initialize without lock");
|
||||
lock->Release();
|
||||
|
||||
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/boss_p.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/boss_u.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/cam_u.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/cecd_s.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/cecd_u.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include "common/log.h"
|
||||
#include "common/make_unique.h"
|
||||
#include "core/file_sys/archive_systemsavedata.h"
|
||||
#include "core/hle/service/cfg/cfg.h"
|
||||
|
@ -109,7 +108,7 @@ ResultCode UpdateConfigNANDSavegame() {
|
|||
mode.create_flag = 1;
|
||||
FileSys::Path path("config");
|
||||
auto file = cfg_system_save_data->OpenFile(path, mode);
|
||||
_assert_msg_(Service_CFG, file != nullptr, "could not open file");
|
||||
ASSERT_MSG(file != nullptr, "could not open file");
|
||||
file->Write(0, CONFIG_SAVEFILE_SIZE, 1, cfg_config_file_buffer.data());
|
||||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/cfg/cfg.h"
|
||||
#include "core/hle/service/cfg/cfg_i.h"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/cfg/cfg.h"
|
||||
#include "core/hle/service/cfg/cfg_s.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/file_util.h"
|
||||
#include "common/log.h"
|
||||
#include "common/string_util.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/file_sys/archive_systemsavedata.h"
|
||||
|
@ -84,7 +83,7 @@ static void GetCountryCodeID(Service::Interface* self) {
|
|||
u16 country_code_id = 0;
|
||||
|
||||
// The following algorithm will fail if the first country code isn't 0.
|
||||
_dbg_assert_(Service_CFG, country_codes[0] == 0);
|
||||
DEBUG_ASSERT(country_codes[0] == 0);
|
||||
|
||||
for (size_t id = 0; id < country_codes.size(); ++id) {
|
||||
if (country_codes[id] == country_code) {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/csnd_snd.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/service/dsp_dsp.h"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/err_f.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/frd_a.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/frd_u.h"
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ ResultCode RegisterArchiveType(std::unique_ptr<FileSys::ArchiveFactory>&& factor
|
|||
auto result = id_code_map.emplace(id_code, std::move(factory));
|
||||
|
||||
bool inserted = result.second;
|
||||
_assert_msg_(Service_FS, inserted, "Tried to register more than one archive with same id code");
|
||||
ASSERT_MSG(inserted, "Tried to register more than one archive with same id code");
|
||||
|
||||
auto& archive = result.first->second;
|
||||
LOG_DEBUG(Service_FS, "Registered archive %s with id code 0x%08X", archive->GetName().c_str(), id_code);
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
#include "common/log.h"
|
||||
#include "common/bit_field.h"
|
||||
|
||||
#include "core/mem_map.h"
|
||||
|
@ -36,7 +34,7 @@ static inline u8* GetCommandBuffer(u32 thread_id) {
|
|||
}
|
||||
|
||||
static inline FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index) {
|
||||
_dbg_assert_msg_(Service_GSP, screen_index < 2, "Invalid screen index");
|
||||
DEBUG_ASSERT_MSG(screen_index < 2, "Invalid screen index");
|
||||
|
||||
// For each thread there are two FrameBufferUpdate fields
|
||||
u32 offset = 0x200 + (2 * thread_id + screen_index) * sizeof(FrameBufferUpdate);
|
||||
|
@ -186,7 +184,7 @@ static void RegisterInterruptRelayQueue(Service::Interface* self) {
|
|||
u32 flags = cmd_buff[1];
|
||||
|
||||
g_interrupt_event = Kernel::g_handle_table.Get<Kernel::Event>(cmd_buff[3]);
|
||||
_assert_msg_(GSP, (g_interrupt_event != nullptr), "handle is not valid!");
|
||||
ASSERT_MSG((g_interrupt_event != nullptr), "handle is not valid!");
|
||||
g_shared_memory = Kernel::SharedMemory::Create("GSPSharedMem");
|
||||
|
||||
Handle shmem_handle = Kernel::g_handle_table.Create(g_shared_memory).MoveFrom();
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
#include "common/log.h"
|
||||
#include "common/bit_field.h"
|
||||
|
||||
#include "core/hle/service/gsp_lcd.h"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/hid/hid_spvr.h"
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/kernel/shared_memory.h"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/http_c.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/ir_rst.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/ir_u.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/ldr_ro.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/mic_u.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/news_s.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/news_u.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/nim_aoc.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/nwm_uds.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/pm_app.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/ptm_play.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "common/make_unique.h"
|
||||
#include "core/file_sys/archive_extsavedata.h"
|
||||
#include "core/hle/hle.h"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "common/make_unique.h"
|
||||
|
||||
#include "core/hle/hle.h"
|
||||
|
@ -148,7 +147,7 @@ Interface::Interface() {
|
|||
Service::FS::FormatArchive(Service::FS::ArchiveIdCode::SharedExtSaveData, archive_path);
|
||||
// Open it again to get a valid archive now that the folder exists
|
||||
archive_result = Service::FS::OpenArchive(Service::FS::ArchiveIdCode::SharedExtSaveData, archive_path);
|
||||
_assert_msg_(Service_PTM, archive_result.Succeeded(), "Could not open the PTM SharedExtSaveData archive!");
|
||||
ASSERT_MSG(archive_result.Succeeded(), "Could not open the PTM SharedExtSaveData archive!");
|
||||
|
||||
FileSys::Path gamecoin_path("gamecoin.dat");
|
||||
FileSys::Mode open_mode = {};
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <poll.h>
|
||||
#endif
|
||||
|
||||
#include "common/log.h"
|
||||
#include "common/scope_exit.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/soc_u.h"
|
||||
|
@ -259,7 +258,7 @@ union CTRSockAddr {
|
|||
break;
|
||||
}
|
||||
default:
|
||||
_dbg_assert_msg_(Service_SOC, false, "Unhandled address family (sa_family) in CTRSockAddr::ToPlatform");
|
||||
ASSERT_MSG(false, "Unhandled address family (sa_family) in CTRSockAddr::ToPlatform");
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
|
@ -280,7 +279,7 @@ union CTRSockAddr {
|
|||
break;
|
||||
}
|
||||
default:
|
||||
_dbg_assert_msg_(Service_SOC, false, "Unhandled address family (sa_family) in CTRSockAddr::ToPlatform");
|
||||
ASSERT_MSG(false, "Unhandled address family (sa_family) in CTRSockAddr::ToPlatform");
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/ssl_c.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/service/y2r_u.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue