Fix scoped_lock clash with >= c++17

pull/496/head
jackun 3 years ago
parent 3e77dd6e0b
commit f77a73ce8a
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -65,9 +65,6 @@ void update_hw_info(struct swapchain_stats& sw_stats, struct overlay_params& par
// Save data for graphs
if (graph_data.size() > 50)
graph_data.erase(graph_data.begin());
#ifdef _WIN32
float memused = 0;
#endif
graph_data.push_back(currentLogData);
logger->notify_data_valid();
HUDElements.update_exec();

@ -34,6 +34,18 @@
#include "dbus_info.h"
#endif
#if __cplusplus >= 201703L
template<typename... Ts>
size_t get_hash(Ts const&... args)
{
size_t hash = 0;
( (hash ^= std::hash<Ts>{}(args) << 1), ...);
return hash;
}
#else
// C++17 has `if constexpr` so this won't be needed then
template<typename... Ts>
size_t get_hash()
@ -53,6 +65,8 @@ size_t get_hash(T const& first, Ts const&... rest)
return hash;
}
#endif
static enum overlay_param_position
parse_position(const char *str)
{

@ -191,19 +191,19 @@ thread_local ImGuiContext* __MesaImGui;
static void *find_object_data(uint64_t obj)
{
scoped_lock lk(global_lock);
::scoped_lock lk(global_lock);
return vk_object_to_data[obj];
}
static void map_object(uint64_t obj, void *data)
{
scoped_lock lk(global_lock);
::scoped_lock lk(global_lock);
vk_object_to_data[obj] = data;
}
static void unmap_object(uint64_t obj)
{
scoped_lock lk(global_lock);
::scoped_lock lk(global_lock);
vk_object_to_data.erase(obj);
}
@ -721,7 +721,7 @@ static void compute_swapchain_display(struct swapchain_data *data)
ImGui::NewFrame();
{
scoped_lock lk(instance_data->notifier.mutex);
::scoped_lock lk(instance_data->notifier.mutex);
position_layer(data->sw_stats, instance_data->params, data->window_size);
render_imgui(data->sw_stats, instance_data->params, data->window_size, true);
}

Loading…
Cancel
Save