return MEDIA_VISION_ERROR_NONE;
}
-bool IsJsonFile(const std::string& fileName)
+static bool IsJsonFile(const std::string& fileName)
{
- if (!fileName.substr(fileName.find_last_of(".") + 1).compare("json"))
- return true;
-
- return false;
+ return (!fileName.substr(fileName.find_last_of(".") + 1).compare("json"));
}
static bool IsValidBackendType(const int backend_type)
{
- if (backend_type > MV_INFERENCE_BACKEND_NONE &&
- backend_type < MV_INFERENCE_BACKEND_MAX)
- return true;
-
- return false;
+ return (backend_type > MV_INFERENCE_BACKEND_NONE &&
+ backend_type < MV_INFERENCE_BACKEND_MAX);
}
static bool IsConfigFilePathRequired(const int target_device_type, const int backend_type)
{
// In case of MV_INFERENCE_TARGET_DEVICE_CUSTOM via MLAPI backend, config file path is required.
- if (backend_type == MV_INFERENCE_BACKEND_MLAPI &&
- target_device_type & MV_INFERENCE_TARGET_DEVICE_CUSTOM)
- return true;
-
- return false;
+ return (backend_type == MV_INFERENCE_BACKEND_MLAPI &&
+ target_device_type & MV_INFERENCE_TARGET_DEVICE_CUSTOM);
}
int mv_inference_configure_model_open(mv_inference_h infer,