Pcbnew: Allow lambdas with capture to be used for a selection filter

Using a function pointer limits to only lambdas without captures.
This commit is contained in:
John Beard 2024-08-28 15:09:57 +01:00
parent d4d39d3c8b
commit 537613df22

View File

@ -28,6 +28,7 @@
#ifndef PCB_SELECTION_TOOL_H
#define PCB_SELECTION_TOOL_H
#include <functional>
#include <memory>
#include <math/vector2d.h>
@ -50,7 +51,8 @@ namespace KIGFX
}
typedef void (*CLIENT_SELECTION_FILTER)( const VECTOR2I&, GENERAL_COLLECTOR&, PCB_SELECTION_TOOL* );
using CLIENT_SELECTION_FILTER =
std::function<void( const VECTOR2I&, GENERAL_COLLECTOR&, PCB_SELECTION_TOOL* )>;
/**