Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirdEyeSqueegee committed Apr 30, 2024
1 parent 024e5cd commit 4aa0dcc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
*ReSharper*
.vs
contrib/Plugin*
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ find_path(SIMPLEINI_INCLUDE_DIRS "SimpleIni.h")
# PRIVATE
# SomeLibrary::SomeLibrary
# )

target_include_directories(
${PROJECT_NAME}
PRIVATE
Expand Down
3 changes: 2 additions & 1 deletion src/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ namespace Events
{
RE::BSEventNotifyControl OnEquipEventHandler::ProcessEvent(const RE::TESEquipEvent* a_event, RE::BSTEventSource<RE::TESEquipEvent>* a_eventSource) noexcept
{
if (!a_event)
if (!a_event) {
return RE::BSEventNotifyControl::kContinue;
}

// Do stuff

Expand Down
9 changes: 6 additions & 3 deletions src/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
void InitializeLogging() noexcept
{
auto path{ SKSE::log::log_directory() };
if (!path)
if (!path) {
stl::report_and_fail("Unable to lookup SKSE logs directory.");
}
*path /= SKSE::PluginDeclaration::GetSingleton()->GetName();
*path += L".log";

std::shared_ptr<spdlog::logger> log;
if (IsDebuggerPresent())
if (IsDebuggerPresent()) {
log = std::make_shared<spdlog::logger>("Global", std::make_shared<spdlog::sinks::msvc_sink_mt>());
else
}
else {
log = std::make_shared<spdlog::logger>("Global", std::make_shared<spdlog::sinks::basic_file_sink_mt>(path->string(), true));
}

log->set_level(spdlog::level::info);
log->flush_on(spdlog::level::trace);
Expand Down
4 changes: 3 additions & 1 deletion src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ SKSEPluginLoad(const SKSE::LoadInterface* skse)

Init(skse);

if (const auto messaging{ SKSE::GetMessagingInterface() }; !messaging->RegisterListener(Listener))
if (const auto messaging{ SKSE::GetMessagingInterface() }; !messaging->RegisterListener(Listener)) {
return false;
}

logger::info("{} has finished loading.", plugin->GetName());
logger::info("");

return true;
}
1 change: 1 addition & 0 deletions src/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ void Settings::LoadSettings() noexcept
// Load settings

logger::info("Loaded settings");
logger::info("");
}

0 comments on commit 4aa0dcc

Please sign in to comment.