mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 04:06:40 +00:00
Avoid using reserved identifier in the global namespace
apps/launcher/datafilespage.cpp:762:12: warning: declaration uses identifier '_reloadCellsMutex', which is reserved in the global namespace [bugprone-reserved-identifier] std::mutex _reloadCellsMutex; ^~~~~~~~~~~~~~~~~ reloadCellsMutex apps/openmw/mwgui/journalwindow.cpp:86:103: warning: declaration uses identifier '_sender', which is reserved in the global namespace [bugprone-reserved-identifier] void adviseButtonClick (char const * name, void (JournalWindowImpl::*Handler) (MyGUI::Widget* _sender)) ^~~~~~~ sender apps/openmw/mwgui/journalwindow.cpp:92:100: warning: declaration uses identifier '_sender', which is reserved in the global namespace [bugprone-reserved-identifier] void adviseKeyPress (char const * name, void (JournalWindowImpl::*Handler) (MyGUI::Widget* _sender, MyGUI::KeyCode key, MyGUI::Char character)) ^~~~~~~ sender
This commit is contained in:
parent
72bda2bd10
commit
4ecee2e167
2 changed files with 6 additions and 6 deletions
|
@ -759,13 +759,13 @@ void Launcher::DataFilesPage::slotAddonDataChanged()
|
|||
}
|
||||
|
||||
// Mutex lock to run reloadCells synchronously.
|
||||
std::mutex _reloadCellsMutex;
|
||||
static std::mutex reloadCellsMutex;
|
||||
|
||||
void Launcher::DataFilesPage::reloadCells(QStringList selectedFiles)
|
||||
{
|
||||
// Use a mutex lock so that we can prevent two threads from executing the rest of this code at the same time
|
||||
// Based on https://stackoverflow.com/a/5429695/531762
|
||||
std::unique_lock<std::mutex> lock(_reloadCellsMutex);
|
||||
std::unique_lock<std::mutex> lock(reloadCellsMutex);
|
||||
|
||||
// The following code will run only if there is not another thread currently running it
|
||||
CellNameLoader cellNameLoader;
|
||||
|
|
|
@ -83,16 +83,16 @@ namespace
|
|||
setVisible (visible);
|
||||
}
|
||||
|
||||
void adviseButtonClick (char const * name, void (JournalWindowImpl::*Handler) (MyGUI::Widget* _sender))
|
||||
void adviseButtonClick (char const * name, void (JournalWindowImpl::*handler)(MyGUI::Widget*))
|
||||
{
|
||||
getWidget <MyGUI::Widget> (name) ->
|
||||
eventMouseButtonClick += newDelegate(this, Handler);
|
||||
eventMouseButtonClick += newDelegate(this, handler);
|
||||
}
|
||||
|
||||
void adviseKeyPress (char const * name, void (JournalWindowImpl::*Handler) (MyGUI::Widget* _sender, MyGUI::KeyCode key, MyGUI::Char character))
|
||||
void adviseKeyPress (char const * name, void (JournalWindowImpl::*handler)(MyGUI::Widget*, MyGUI::KeyCode, MyGUI::Char))
|
||||
{
|
||||
getWidget <MyGUI::Widget> (name) ->
|
||||
eventKeyButtonPressed += newDelegate(this, Handler);
|
||||
eventKeyButtonPressed += newDelegate(this, handler);
|
||||
}
|
||||
|
||||
MWGui::BookPage* getPage (char const * name)
|
||||
|
|
Loading…
Reference in a new issue