From fc2d933224872fa072495353d29519a86b12de23 Mon Sep 17 00:00:00 2001 From: Wang Kai Date: Thu, 15 Jun 2023 01:09:02 +0800 Subject: [PATCH] removing unreachable code and fixing a typo --- modules/dnn/src/caffe/caffe_importer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/dnn/src/caffe/caffe_importer.cpp b/modules/dnn/src/caffe/caffe_importer.cpp index b8b520c1a6..3c08b92a75 100644 --- a/modules/dnn/src/caffe/caffe_importer.cpp +++ b/modules/dnn/src/caffe/caffe_importer.cpp @@ -97,11 +97,11 @@ class CaffeImporter public: - CaffeImporter(const char *pototxt, const char *caffeModel) + CaffeImporter(const char *prototxt, const char *caffeModel) { CV_TRACE_FUNCTION(); - ReadNetParamsFromTextFileOrDie(pototxt, &net); + ReadNetParamsFromTextFileOrDie(prototxt, &net); if (caffeModel && caffeModel[0]) ReadNetParamsFromBinaryFileOrDie(caffeModel, &netBinary); @@ -193,7 +193,6 @@ public: break; default: CV_Error(Error::StsError, "Unknown type \"" + String(field->type_name()) + "\" in prototxt"); - break; } } @@ -556,7 +555,6 @@ public: if (idx < 0) { CV_Error(Error::StsObjectNotFound, "Can't find output blob \"" + name + "\""); - return; } dstNet.connect(addedBlobs[idx].layerId, addedBlobs[idx].outNum, layerId, inNum);