Add fixes related to coverity.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
const std::string LayerNode::getType() const { return getLayer()->getType(); }
-bool LayerNode::getTrainable() const noexcept {
+bool LayerNode::getTrainable() const {
return std::get<props::Trainable>(*layer_node_props);
}
-bool LayerNode::getFlatten() const noexcept {
+bool LayerNode::getFlatten() const {
auto &flatten = std::get<props::Flatten>(*layer_node_props);
if (flatten.empty()) {
return false;
return flatten.get();
}
-bool LayerNode::getDistribute() const noexcept {
+bool LayerNode::getDistribute() const {
auto &distribute = std::get<props::Distribute>(*layer_node_props);
if (distribute.empty()) {
return false;
*
* @return boolean true if trainable, else false
*/
- bool getTrainable() const noexcept;
+ bool getTrainable() const;
/**
* @brief get if the output of this layer must be flatten
* @retval flatten value
*/
- bool getFlatten() const noexcept;
+ bool getFlatten() const;
/**
* @brief get distribute for this layer
* @retval dist to enable/disable distribute
*/
- bool getDistribute() const noexcept;
+ bool getDistribute() const;
/**
* @brief get activation for this layer
single = nullptr;
}
- throw std::invalid_argument("[NNStreamerLayer] Finalizing the layer failed.");
+ if (status != ML_ERROR_NONE)
+ throw std::invalid_argument(
+ "[NNStreamerLayer] Finalizing the layer failed.");
}
void NNStreamerLayer::finalize(InitLayerContext &context) {
* @brief Construct a new Exporter object
*
*/
-Exporter::Exporter() : stored_result(nullptr), is_exported(false){};
+Exporter::Exporter() : stored_result(nullptr), is_exported(false) {}
/**
* @brief Destroy the Exporter object