0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-28 17:28:14 +08:00

small refactoring

This commit is contained in:
Victor Zarubkin 2016-09-17 11:10:45 +03:00
parent 34bb8d8119
commit ce61ea1a77
3 changed files with 7 additions and 7 deletions

View File

@ -44,7 +44,7 @@ namespace profiler_gui {
} }
EasyGlobals::EasyGlobals() EasyGlobals::EasyGlobals()
: selected_thread(0) : selected_thread(0U)
, selected_block(::profiler_gui::numeric_max<decltype(selected_block)>()) , selected_block(::profiler_gui::numeric_max<decltype(selected_block)>())
, chrono_text_position(ChronoTextPosition_Center) , chrono_text_position(ChronoTextPosition_Center)
, enable_statistics(true) , enable_statistics(true)

View File

@ -95,7 +95,7 @@ namespace profiler_gui {
::profiler::descriptors_list_t descriptors; ///< Profiler block descriptors list ::profiler::descriptors_list_t descriptors; ///< Profiler block descriptors list
EasyBlocks gui_blocks; ///< Profiler graphics blocks builded by GUI EasyBlocks gui_blocks; ///< Profiler graphics blocks builded by GUI
::profiler::thread_id_t selected_thread; ///< Current selected thread id ::profiler::thread_id_t selected_thread; ///< Current selected thread id
unsigned int selected_block; ///< Current selected profiler block index ::profiler::block_index_t selected_block; ///< Current selected profiler block index
ChronometerTextPosition chrono_text_position; ///< ChronometerTextPosition chrono_text_position; ///<
bool enable_statistics; ///< Enable gathering and using statistics (Disable if you want to consume less memory) bool enable_statistics; ///< Enable gathering and using statistics (Disable if you want to consume less memory)
bool draw_graphics_items_borders; ///< Draw borders for graphics blocks or not bool draw_graphics_items_borders; ///< Draw borders for graphics blocks or not

View File

@ -179,11 +179,11 @@ namespace profiler {
LUID privilegyId; LUID privilegyId;
if (LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &privilegyId)) if (LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &privilegyId))
{ {
TOKEN_PRIVILEGES tokenPrivilegy; TOKEN_PRIVILEGES tokenPrivilege;
tokenPrivilegy.PrivilegeCount = 1; tokenPrivilege.PrivilegeCount = 1;
tokenPrivilegy.Privileges[0].Luid = privilegyId; tokenPrivilege.Privileges[0].Luid = privilegyId;
tokenPrivilegy.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; tokenPrivilege.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
success = AdjustTokenPrivileges(hToken, FALSE, &tokenPrivilegy, sizeof(TOKEN_PRIVILEGES), NULL, NULL) != FALSE; success = AdjustTokenPrivileges(hToken, FALSE, &tokenPrivilege, sizeof(TOKEN_PRIVILEGES), NULL, NULL) != FALSE;
} }
CloseHandle(hToken); CloseHandle(hToken);