chore: linting

This commit is contained in:
Almamu 2024-05-07 04:24:46 +02:00
parent f20b2a0c37
commit 8dbb4aa7e8
5 changed files with 35 additions and 37 deletions

View File

@ -19,7 +19,8 @@ float g_TimeLast;
float g_Daytime;
namespace WallpaperEngine::Application {
CWallpaperApplication::CWallpaperApplication (CApplicationContext& context, WallpaperEngine::WebBrowser::CWebBrowserContext& browserContext) :
CWallpaperApplication::CWallpaperApplication (CApplicationContext& context,
WallpaperEngine::WebBrowser::CWebBrowserContext& browserContext) :
m_context (context),
m_defaultBackground (nullptr),
browserContext (browserContext) {

View File

@ -9,7 +9,6 @@ const std::string& CWeb::getFilename () {
return this->m_filename;
}
CWeb::CWeb (std::string filename, CProject& project) : CWallpaper (Type, project), m_filename (std::move (filename)) {
}
CWeb::CWeb (std::string filename, CProject& project) : CWallpaper (Type, project), m_filename (std::move (filename)) {}
const std::string CWeb::Type = "web";

View File

@ -287,7 +287,8 @@ CWallpaper* CWallpaper::fromWallpaper (Core::CWallpaper* wallpaper, CRenderConte
if (wallpaper->is<Core::CVideo> ())
return new WallpaperEngine::Render::CVideo (wallpaper->as<Core::CVideo> (), context, audioContext, scalingMode);
else if (wallpaper->is<Core::CWeb> ())
return new WallpaperEngine::Render::CWeb (wallpaper->as<Core::CWeb> (), context, audioContext, browserContext, scalingMode);
return new WallpaperEngine::Render::CWeb (wallpaper->as<Core::CWeb> (), context, audioContext, browserContext,
scalingMode);
else
sLog.exception ("Unsupported wallpaper type");
}

View File

@ -6,8 +6,7 @@
using namespace WallpaperEngine::Render;
using namespace WallpaperEngine::WebBrowser;
CWeb::CWeb (Core::CWeb* web, CRenderContext& context, CAudioContext& audioContext,
CWebBrowserContext& browserContext,
CWeb::CWeb (Core::CWeb* web, CRenderContext& context, CAudioContext& audioContext, CWebBrowserContext& browserContext,
const CWallpaperState::TextureUVsScaling& scalingMode) :
CWallpaper (web, Type, context, audioContext, scalingMode),
m_width (16),

View File

@ -17,14 +17,13 @@ CWebBrowserContext::CWebBrowserContext (int argc, char** argv) : m_stopped(false
CefMainArgs args (argc, argv2);
int exit_code = CefExecuteProcess(args, nullptr, nullptr);//Spawned processes will terminate here(see CefIninitilize below). Maybe implementing settings.browser_subprocess_path will allow it to work not in main function.
if (exit_code >= 0)
{
int exit_code = CefExecuteProcess (
args, nullptr, nullptr); // Spawned processes will terminate here(see CefIninitilize below). Maybe implementing
// settings.browser_subprocess_path will allow it to work not in main function.
if (exit_code >= 0) {
// Sub proccess has endend, so exit
exit (exit_code);
}
else if (exit_code == -1)
{
} else if (exit_code == -1) {
// If called for the browser process (identified by no "type" command-line value)
// it will return immediately with a value of -1
}
@ -44,8 +43,7 @@ CWebBrowserContext::CWebBrowserContext (int argc, char** argv) : m_stopped(false
// spawns two new processess
bool result = CefInitialize (args, settings, nullptr, nullptr);
if (!result)
{
if (!result) {
sLog.exception ("CefInitialize: failed");
}
}