core: repair CV_Assert() messages
Multi-argument CV_Assert() is accessible via CV_Assert_N() (with malformed messages).
This commit is contained in:
@@ -57,7 +57,6 @@ int main(int argc, char** argv)
|
||||
float scale = parser.get<float>("scale");
|
||||
Scalar mean = parser.get<Scalar>("mean");
|
||||
bool swapRB = parser.get<bool>("rgb");
|
||||
CV_Assert(parser.has("width"), parser.has("height"));
|
||||
int inpWidth = parser.get<int>("width");
|
||||
int inpHeight = parser.get<int>("height");
|
||||
String model = parser.get<String>("model");
|
||||
@@ -99,7 +98,13 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
CV_Assert(parser.has("model"));
|
||||
if (!parser.check())
|
||||
{
|
||||
parser.printErrors();
|
||||
return 1;
|
||||
}
|
||||
|
||||
CV_Assert(!model.empty());
|
||||
//! [Read and initialize network]
|
||||
Net net = readNet(model, config, framework);
|
||||
net.setPreferableBackend(backendId);
|
||||
|
||||
Reference in New Issue
Block a user