From 680eeecc3b0bd5adb49d67f16ad300702931485d Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Mon, 17 Dec 2012 13:19:26 +0400 Subject: [PATCH] fixed samples compilation --- samples/cpp/detector_descriptor_evaluation.cpp | 6 +++--- samples/cpp/generic_descriptor_match.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/cpp/detector_descriptor_evaluation.cpp b/samples/cpp/detector_descriptor_evaluation.cpp index eb8132f..650db65 100644 --- a/samples/cpp/detector_descriptor_evaluation.cpp +++ b/samples/cpp/detector_descriptor_evaluation.cpp @@ -535,7 +535,7 @@ void DetectorQualityEvaluator::readAlgorithm () { defaultDetector = FeatureDetector::create( algName ); specificDetector = FeatureDetector::create( algName ); - if( defaultDetector == 0 ) + if( defaultDetector.empty() ) { printf( "Algorithm can not be read\n" ); exit(-1); @@ -769,14 +769,14 @@ void DescriptorQualityEvaluator::readAlgorithm( ) defaultDescMatcher = GenericDescriptorMatcher::create( algName ); specificDescMatcher = GenericDescriptorMatcher::create( algName ); - if( defaultDescMatcher == 0 ) + if( defaultDescMatcher.empty() ) { Ptr extractor = DescriptorExtractor::create( algName ); Ptr matcher = DescriptorMatcher::create( matcherName ); defaultDescMatcher = new VectorDescriptorMatch( extractor, matcher ); specificDescMatcher = new VectorDescriptorMatch( extractor, matcher ); - if( extractor == 0 || matcher == 0 ) + if( extractor.empty() || matcher.empty() ) { printf("Algorithm can not be read\n"); exit(-1); diff --git a/samples/cpp/generic_descriptor_match.cpp b/samples/cpp/generic_descriptor_match.cpp index c86fdeb..9665bcc 100644 --- a/samples/cpp/generic_descriptor_match.cpp +++ b/samples/cpp/generic_descriptor_match.cpp @@ -32,7 +32,7 @@ int main(int argc, char** argv) std::string params_filename = std::string(argv[4]); Ptr descriptorMatcher = GenericDescriptorMatcher::create(alg_name, params_filename); - if( descriptorMatcher == 0 ) + if( descriptorMatcher.empty() ) { printf ("Cannot create descriptor\n"); return 0; -- 2.7.4