[*] basic in-house cpp linting (#4039)

- add `#pragma once` to remainder files
- "correcter" defines (ANDROID), see https://groups.google.com/g/android-ndk/c/cf9_f1SLXls
- extra miscelly fixups

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4039
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
lizzie 2026-06-04 05:49:07 +02:00 committed by crueter
parent 978d9d935d
commit 89199f4d27
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
53 changed files with 176 additions and 153 deletions

View file

@ -1009,7 +1009,7 @@ std::string Config::AdjustOutputString(const std::string& string) {
// Windows requires that two forward slashes are used at the start of a path for unmapped
// network drives so we have to watch for that here
#ifndef ANDROID
#ifndef __ANDROID__
if (string.substr(0, 2) == "//") {
boost::replace_all(adjusted_string, "//", "/");
adjusted_string.insert(0, "/");

View file

@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef DATA_MANAGER_H
#define DATA_MANAGER_H
#pragma once
#include "common/common_types.h"
#include <string>
@ -21,5 +20,3 @@ std::string ReadableBytesSize(u64 size) noexcept;
u64 DataDirSize(DataDir dir);
}; // namespace FrontendCommon::DataManager
#endif // DATA_MANAGER_H

View file

@ -13,7 +13,7 @@
#include "core/crypto/key_manager.h"
#include "frontend_common/content_manager.h"
#ifdef ANDROID
#ifdef __ANDROID__
#include <jni.h>
#include <common/android/id_cache.h>
#include <common/android/android_common.h>
@ -25,7 +25,7 @@ FirmwareManager::InstallKeys(std::string location, std::string extension) {
const auto keys_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::KeysDir);
#ifdef ANDROID
#ifdef __ANDROID__
JNIEnv *env = Common::Android::GetEnvForThread();
jstring jsrc = Common::Android::ToJString(env, location);

View file

@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef FIRMWARE_MANAGER_H
#define FIRMWARE_MANAGER_H
#pragma once
#include "common/common_types.h"
#include "core/core.h"
@ -107,5 +106,3 @@ inline std::pair<Service::Set::FirmwareVersionFormat, Result> GetFirmwareVersion
// TODO(crueter): GET AS STRING
}
#endif

View file

@ -5,6 +5,7 @@
#include <filesystem>
#include <optional>
#include <vector>
#include "common/common_types.h"
namespace FrontendCommon {