Fix indentation

This commit is contained in:
momo5502 2019-01-09 12:09:34 +01:00
parent 7c731368af
commit 5ba522d2d0
7 changed files with 26 additions and 26 deletions

View File

@ -23,7 +23,7 @@ void command::add(const std::string& name, const std::function<void(const std::v
void command::pre_destroy() void command::pre_destroy()
{ {
std::lock_guard _(mutex_); std::lock_guard _(mutex_);
if(!callbacks_.empty()) if (!callbacks_.empty())
{ {
callbacks_.clear(); callbacks_.clear();
} }

View File

@ -19,7 +19,8 @@ public:
private: private:
static HINSTANCE __stdcall shell_execute_a(const HWND hwnd, const LPCSTR lp_operation, const LPCSTR lp_file, static HINSTANCE __stdcall shell_execute_a(const HWND hwnd, const LPCSTR lp_operation, const LPCSTR lp_file,
const LPCSTR lp_parameters, const LPCSTR lp_directory, INT n_show_cmd) const LPCSTR lp_parameters, const LPCSTR lp_directory,
const INT n_show_cmd)
{ {
static const auto sp_url = "steam://run/42680"s; static const auto sp_url = "steam://run/42680"s;
static const auto mp_url = "steam://run/42690"s; static const auto mp_url = "steam://run/42690"s;

View File

@ -171,7 +171,7 @@ private:
this->steam_pipe_ = nullptr; this->steam_pipe_ = nullptr;
this->global_user_ = nullptr; this->global_user_ = nullptr;
this->steam_client_module_ = utils::nt::module{ nullptr }; this->steam_client_module_ = utils::nt::module{nullptr};
} }
}; };

View File

@ -12,7 +12,6 @@ namespace steam
interface::interface(void* interface_ptr) : interface_ptr_(static_cast<void***>(interface_ptr)) interface::interface(void* interface_ptr) : interface_ptr_(static_cast<void***>(interface_ptr))
{ {
} }
interface::operator bool() const interface::operator bool() const
@ -23,7 +22,7 @@ namespace steam
interface::method interface::find_method(const std::string& name) interface::method interface::find_method(const std::string& name)
{ {
const auto method_entry = this->methods_.find(name); const auto method_entry = this->methods_.find(name);
if(method_entry != this->methods_.end()) if (method_entry != this->methods_.end())
{ {
return method_entry->second; return method_entry->second;
} }
@ -42,7 +41,7 @@ namespace steam
const auto result = this->analyze_method(*vftbl); const auto result = this->analyze_method(*vftbl);
if (result.param_size_found && result.name_found) if (result.param_size_found && result.name_found)
{ {
const method method_result { *vftbl, result.param_size }; const method method_result{*vftbl, result.param_size};
this->methods_[result.name] = method_result; this->methods_[result.name] = method_result;
if (result.name == name) if (result.name == name)
@ -102,7 +101,7 @@ namespace steam
} }
} }
if(*reinterpret_cast<unsigned char*>(ud.pc) == 0xCC) break; // int 3 if (*reinterpret_cast<unsigned char*>(ud.pc) == 0xCC) break; // int 3
if (result.param_size_found && result.name_found) break; if (result.param_size_found && result.name_found) break;
} }
@ -113,14 +112,14 @@ namespace steam
{ {
const auto pointer_lib = utils::nt::module::get_by_address(pointer); const auto pointer_lib = utils::nt::module::get_by_address(pointer);
for(const auto& section : pointer_lib.get_section_headers()) for (const auto& section : pointer_lib.get_section_headers())
{ {
const auto size = sizeof(section->Name); const auto size = sizeof(section->Name);
char name[size + 1]; char name[size + 1];
name[size] = 0; name[size] = 0;
std::memcpy(name, section->Name, size); std::memcpy(name, section->Name, size);
if(name == ".rdata"s) if (name == ".rdata"s)
{ {
const auto target = size_t(pointer); const auto target = size_t(pointer);
const size_t source_start = size_t(pointer_lib.get_ptr()) + section->PointerToRawData; const size_t source_start = size_t(pointer_lib.get_ptr()) + section->PointerToRawData;

View File

@ -83,10 +83,10 @@ namespace steam
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, &reg_key) == if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, &reg_key) ==
ERROR_SUCCESS) ERROR_SUCCESS)
{ {
char path[MAX_PATH] = { 0 }; char path[MAX_PATH] = {0};
DWORD length = sizeof(path); DWORD length = sizeof(path);
RegQueryValueExA(reg_key, "InstallPath", nullptr, nullptr, reinterpret_cast<BYTE*>(path), RegQueryValueExA(reg_key, "InstallPath", nullptr, nullptr, reinterpret_cast<BYTE*>(path),
&length); &length);
RegCloseKey(reg_key); RegCloseKey(reg_key);
std::string steam_path = path; std::string steam_path = path;
@ -114,7 +114,7 @@ namespace steam
if (!overlay) if (!overlay)
{ {
const auto steam_path = get_steam_install_directory(); const auto steam_path = get_steam_install_directory();
if(!steam_path.empty()) if (!steam_path.empty())
{ {
overlay = ::utils::nt::module::load(steam_path + "gameoverlayrenderer.dll"); overlay = ::utils::nt::module::load(steam_path + "gameoverlayrenderer.dll");
} }