From 03ce7973bf39988cc428bdf14f4b62c7538d3fc6 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Wed, 11 Feb 2015 19:20:19 +0100 Subject: [PATCH] Use Nan for template matches --- src/Matrix.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Matrix.cc b/src/Matrix.cc index 40b9dc8..d1f5382 100755 --- a/src/Matrix.cc +++ b/src/Matrix.cc @@ -1730,11 +1730,8 @@ NAN_METHOD(Matrix::FloodFill){ // @author olfox // Returns an array of the most probable positions // Usage: output = input.templateMatches(min_probability, max_probability, limit, ascending, min_x_distance, min_y_distance); -Handle -Matrix::TemplateMatches(const v8::Arguments& args) { - HandleScope scope; - - Matrix *self = ObjectWrap::Unwrap(args.This()); +NAN_METHOD(Matrix::TemplateMatches){ + SETUP_FUNCTION(Matrix) bool filter_min_probability = (args.Length() >= 1) ? args[0]->IsNumber() : false; bool filter_max_probability = (args.Length() >= 2) ? args[1]->IsNumber() : false;