1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Reintroduce explicit template type for std::lock_guard.

Requested in issue #4 for support of older MSVC versions.
This commit is contained in:
Bartosz Taudul
2018-07-13 12:30:29 +02:00
parent 90a874f311
commit 96042891f7
2 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -360,7 +360,7 @@ bool View::DrawImpl()
keepOpenPtr = &keepOpen;
}
std::lock_guard lock( m_worker.GetDataLock() );
std::lock_guard<NonRecursiveBenaphore> lock( m_worker.GetDataLock() );
char tmp[2048];
sprintf( tmp, "%s###Profiler", m_worker.GetCaptureName().c_str() );
ImGui::SetNextWindowSize( ImVec2( 1550, 800 ), ImGuiCond_FirstUseEver );
@@ -433,7 +433,7 @@ void View::DrawConnection()
const auto cs = ty * 0.9f;
{
std::lock_guard lock( m_worker.GetMbpsDataLock() );
std::lock_guard<NonRecursiveBenaphore> lock( m_worker.GetMbpsDataLock() );
ImGui::Begin( m_worker.GetAddr().c_str(), nullptr, ImGuiWindowFlags_AlwaysAutoResize );
const auto& mbpsVector = m_worker.GetMbpsData();
const auto mbps = mbpsVector.back();
@@ -457,7 +457,7 @@ void View::DrawConnection()
const auto wpos = ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin();
ImGui::GetWindowDrawList()->AddCircleFilled( wpos + ImVec2( 1 + cs * 0.5, 3 + ty * 0.5 ), cs * 0.5, m_worker.IsConnected() ? 0xFF2222CC : 0xFF444444, 10 );
std::lock_guard lock( m_worker.GetDataLock() );
std::lock_guard<NonRecursiveBenaphore> lock( m_worker.GetDataLock() );
{
const auto sz = m_worker.GetFrameCount();
if( sz > 1 )