From 7b069252f8087f76a6ac3c73a7736a663d58e7b2 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 27 Oct 2019 03:58:37 -0300 Subject: shader/control_flow: Use callable template instead of std::function --- src/video_core/shader/control_flow.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/video_core/shader/control_flow.cpp b/src/video_core/shader/control_flow.cpp index 278de4084..7e6364d94 100644 --- a/src/video_core/shader/control_flow.cpp +++ b/src/video_core/shader/control_flow.cpp @@ -2,7 +2,6 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include #include #include #include @@ -157,11 +156,11 @@ std::optional> GetBRXInfo(const CFGRebuildState& state, u32& return std::make_pair(instr.brx.GetBranchExtend(), instr.gpr8.Value()); } -template -std::optional TrackInstruction( - const CFGRebuildState& state, u32& pos, - std::function&& test, - std::function&& pack) { +template +// requires std::predicate +// requires std::invocable +std::optional TrackInstruction(const CFGRebuildState& state, u32& pos, TestCallable test, + PackCallable pack) { for (; pos >= state.start; --pos) { if (IsSchedInstruction(pos, state.start)) { continue; -- cgit v1.2.3