MinGW workaround with USE_github_com_meganz_mingw_std_threads

This commit is contained in:
qPCR4vir
2015-12-02 13:38:22 +01:00
parent 003b0b4041
commit 74be76e49a
5 changed files with 42 additions and 10 deletions

View File

@@ -14,9 +14,16 @@
#include <nana/gui/widgets/widget.hpp>
#include <unordered_map>
#include <fstream>
#include <sstream>
#include <memory>
#include <sstream> // Warning:(17, 1) [unused] Unused import statement
#include <memory> // Warning:(17, 1) [unused] Unused import statement
#if defined(STD_THREAD_NOT_SUPPORTED)
#include <nana/std_mutex.hpp>
#else
#include <mutex>
#endif
#include <map>
namespace nana
@@ -68,7 +75,7 @@ namespace nana
bool escape = false;
for (auto i = read_ptr_ + 1; i != end_ptr_; ++i)
{
if (escape)
if (escape) // Warning:(78, 12) Condition is always false
{
escape = false;
continue;
@@ -261,8 +268,9 @@ namespace nana
{
auto result = mgr.table.emplace(wd, std::move(eval));
result.first->second.destroy = nana::API::events(wd).destroy([wd]{
auto & mgr = get_eval_manager();
std::lock_guard<std::recursive_mutex> lock(mgr.mutex);
auto & mgr = get_eval_manager(); // Warning:(271, 13) Local 'mgr' hides previous declaration
std::lock_guard<std::recursive_mutex> lock(mgr.mutex); // Local 'lock' hides previous
mgr.table.erase(wd);
});
}