Skip to content

Commit

Permalink
Silenced warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nefarius committed Feb 13, 2024
1 parent 277cb02 commit cde2541
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 2 additions & 0 deletions HidHide.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=eventlog/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ITERS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=POCO/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=STDEXT/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=uninitialize/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Xbox/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
20 changes: 10 additions & 10 deletions Watchdog/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class WatchdogTask : public Poco::Task
}

public:
explicit WatchdogTask(const std::string& name, bool isInteractive)
explicit WatchdogTask(const std::string& name, const bool isInteractive)
: Task(name)
{
_isInteractive = isInteractive;
Expand Down Expand Up @@ -196,24 +196,24 @@ void App::uninitialize()
int App::main(const std::vector<std::string>& args)
{
const auto console = spdlog::stdout_color_mt("console");
const auto err_logger = spdlog::stderr_color_mt("stderr");
const auto errLogger = spdlog::stderr_color_mt("stderr");

if (this->isInteractive())
{
set_default_logger(err_logger);
set_default_logger(errLogger);
}
else
{
const auto event_log = std::make_shared<spdlog::sinks::win_eventlog_sink_mt>("HidHideWatchdog");
const auto event_logger = std::make_shared<spdlog::logger>("eventlog", event_log);
set_default_logger(event_logger);
const auto eventLog = std::make_shared<spdlog::sinks::win_eventlog_sink_mt>("HidHideWatchdog");
const auto eventLogger = std::make_shared<spdlog::logger>("eventlog", eventLog);
set_default_logger(eventLogger);
}

console->info("Application started");

const bool is_admin = util::IsAdmin();
const bool isAdmin = util::IsAdmin();

if (is_admin)
if (isAdmin)
{
Poco::TaskManager tm;
tm.start(new WatchdogTask("HidHideWatchdog", this->isInteractive()));
Expand All @@ -223,10 +223,10 @@ int App::main(const std::vector<std::string>& args)
}
else
{
err_logger->error("App need administrative permissions to run");
errLogger->error("App need administrative permissions to run");
}

console->info("Exiting application");

return is_admin ? EXIT_OK : EXIT_TEMPFAIL;
return isAdmin ? EXIT_OK : EXIT_TEMPFAIL;
}
1 change: 1 addition & 0 deletions Watchdog/App.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef POCO_WINDOWS_SERVICE_APP_H
#define POCO_WINDOWS_SERVICE_APP_H

#define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING

#include <Poco/Util/ServerApplication.h>

Expand Down

0 comments on commit cde2541

Please sign in to comment.