std::string commandline = util::format_argv_as_win32_command_string(argv);
fs::path tmp_file_path;
- DEFER([&] {
- if (!tmp_file_path.empty()) {
- std::ignore = util::remove(tmp_file_path);
- }
- });
+ DEFER(
+ if (!tmp_file_path.empty()) { std::ignore = util::remove(tmp_file_path); });
if (commandline.length() > 8192) {
auto tmp_file = util::value_or_throw<core::Fatal>(
-// Copyright (C) 2020-2025 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2026 Joel Rosdahl and other contributors
//
// See doc/authors.adoc for a complete list of contributors.
//
#include <functional>
#define DEFER(...) \
- util::Deferrer UNIQUE_VARNAME(_deferrer_)([&] { (void)__VA_ARGS__; })
+ util::Deferrer UNIQUE_VARNAME(_deferrer_)([&] { __VA_ARGS__; })
namespace util {
fail(FMT("Failed to open log file {}", log_path));
}
}
- DEFER([] {
- if (g_log_file) {
- std::fclose(g_log_file);
- }
- });
+ DEFER(if (g_log_file) { std::fclose(g_log_file); });
const char* ipc_endpoint = std::getenv("CRSH_IPC_ENDPOINT");
if (!ipc_endpoint) {