Skip to content

Commit 2153808

Browse files
author
Requiem
committed
style: identation changes
1 parent 12c8180 commit 2153808

2 files changed

Lines changed: 49 additions & 49 deletions

File tree

src/cli/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ int main(int argc, char* argv[]) {
288288

289289
auto it = std::find_if(table.cbegin(), table.cend(), [&](const std::pair<const char*, i32>& p) {
290290
return (std::strcmp(p.first, arg_string) == 0);
291-
});
291+
});
292292

293293
if (it == table.end()) {
294294
if (arg_bitset.test(OUTPUT)) {

src/cli/output.cpp

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ static bool are_perms_required(const VM::enum_flags flag) {
7272
}
7373

7474
switch (flag) {
75-
case VM::VMWARE_DMESG:
76-
case VM::DMIDECODE:
77-
case VM::DMESG:
78-
case VM::QEMU_USB:
79-
case VM::KMSG:
80-
case VM::SMBIOS_VM_BIT:
81-
case VM::NVRAM: return true;
82-
default: return false;
75+
case VM::VMWARE_DMESG:
76+
case VM::DMIDECODE:
77+
case VM::DMESG:
78+
case VM::QEMU_USB:
79+
case VM::KMSG:
80+
case VM::SMBIOS_VM_BIT:
81+
case VM::NVRAM: return true;
82+
default: return false;
8383
}
8484
}
8585
#endif
@@ -247,19 +247,19 @@ static void checker(const VM::enum_flags flag, const char* message) {
247247
return;
248248
}
249249

250-
#if (CLI_LINUX)
251-
if (are_perms_required(flag)) {
252-
no_perms_count++;
253-
VM::check(flag);
254-
return;
255-
}
256-
#endif
250+
#if (CLI_LINUX)
251+
if (are_perms_required(flag)) {
252+
no_perms_count++;
253+
VM::check(flag);
254+
return;
255+
}
256+
#endif
257257

258258
std::ostringstream cycle_oss;
259259
cycle_oss << TH_DIM << message << " " << TH_MED << "| " << TH_WHITE << std::fixed << std::setprecision(4) << ms << " ms" << TH_RST;
260-
#if (CLI_WINDOWS)
261-
g_tui.addCycle(cycle_oss.str());
262-
#endif
260+
#if (CLI_WINDOWS)
261+
g_tui.addCycle(cycle_oss.str());
262+
#endif
263263

264264
std::ostringstream msg_oss;
265265

@@ -446,9 +446,9 @@ void general(bool high_threshold, bool all, bool dynamic) {
446446
const VM::enum_flags al = all ? VM::ALL : VM::NULL_ARG;
447447
const VM::enum_flags dyn = dynamic ? VM::DYNAMIC : VM::NULL_ARG;
448448

449-
#if (CLI_LINUX)
450-
[[maybe_unused]] bool notes_enabled = !arg_bitset.test(NOTES);
451-
#endif
449+
#if (CLI_LINUX)
450+
[[maybe_unused]] bool notes_enabled = !arg_bitset.test(NOTES);
451+
#endif
452452

453453
if (arg_bitset.test(NO_ANSI)) {
454454
tag_detected = ("[ DETECTED ]");
@@ -457,28 +457,28 @@ void general(bool high_threshold, bool all, bool dynamic) {
457457
green = ""; red_orange = ""; green_orange = ""; grey = ""; white = "";
458458
}
459459

460-
#if (CLI_WINDOWS)
461-
DebugInterceptor* interceptor = nullptr;
462-
if (!arg_bitset.test(NO_ANSI)) {
463-
g_tui.init();
464-
interceptor = new DebugInterceptor(std::cout.rdbuf());
465-
std::cout.rdbuf(interceptor);
466-
}
467-
#endif
460+
#if (CLI_WINDOWS)
461+
DebugInterceptor* interceptor = nullptr;
462+
if (!arg_bitset.test(NO_ANSI)) {
463+
g_tui.init();
464+
interceptor = new DebugInterceptor(std::cout.rdbuf());
465+
std::cout.rdbuf(interceptor);
466+
}
467+
#endif
468468

469-
#if (CLI_LINUX)
470-
if (notes_enabled && !is_admin()) {
471-
PRINT_LINE(" Running under root might give better results");
472-
}
473-
#elif (CLI_WINDOWS)
474-
if (!is_admin()) {
475-
do {
476-
std::ostringstream _oss;
477-
_oss << red << " Not running as administrator, NVRAM checks will not run.\n";
478-
g_tui.printLeft(_oss.str());
479-
} while (0);
480-
}
481-
#endif
469+
#if (CLI_LINUX)
470+
if (notes_enabled && !is_admin()) {
471+
PRINT_LINE(" Running under root might give better results");
472+
}
473+
#elif (CLI_WINDOWS)
474+
if (!is_admin()) {
475+
do {
476+
std::ostringstream _oss;
477+
_oss << red << " Not running as administrator, NVRAM checks will not run.\n";
478+
g_tui.printLeft(_oss.str());
479+
} while (0);
480+
}
481+
#endif
482482

483483
const auto t1 = std::chrono::high_resolution_clock::now();
484484

@@ -611,12 +611,12 @@ void general(bool high_threshold, bool all, bool dynamic) {
611611
const char* count_color = nullptr;
612612

613613
switch (vm.detected_count) {
614-
case 0: count_color = red.c_str(); break;
615-
case 1: count_color = red_orange.c_str(); break;
616-
case 2: count_color = orange.c_str(); break;
617-
case 3: count_color = orange.c_str(); break;
618-
case 4: count_color = green_orange.c_str(); break;
619-
default: count_color = green.c_str();
614+
case 0: count_color = red.c_str(); break;
615+
case 1: count_color = red_orange.c_str(); break;
616+
case 2: count_color = orange.c_str(); break;
617+
case 3: count_color = orange.c_str(); break;
618+
case 4: count_color = green_orange.c_str(); break;
619+
default: count_color = green.c_str();
620620
}
621621

622622
summary.push_back(bold + "VM detections: " + ansi_exit + count_color + std::to_string(static_cast<u32>(vm.detected_count)) + "/" + std::to_string(static_cast<u32>(vm.technique_count)) + ansi_exit);

0 commit comments

Comments
 (0)