mirror of
https://github.com/zebrajr/opencv.git
synced 2025-12-06 00:19:46 +01:00
Removed unreachible code reported by MS Visual Studio on Windows.
This commit is contained in:
parent
24640ec65f
commit
34aee6cb28
|
|
@ -141,5 +141,4 @@ cv::GRunArg cv::gapi::bind(cv::GRunArgP &out)
|
|||
GAPI_Error("This value type is UNKNOWN!");
|
||||
break;
|
||||
}
|
||||
return cv::GRunArg();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,22 +206,20 @@ IOStream& operator<< (IOStream& os, const cv::RMat& mat) {
|
|||
mat.serialize(os);
|
||||
return os;
|
||||
}
|
||||
IIStream& operator>> (IIStream& is, cv::RMat&) {
|
||||
IIStream& operator>> (IIStream&, cv::RMat&) {
|
||||
util::throw_error(std::logic_error("operator>> for RMat should never be called. "
|
||||
"Instead, cv::gapi::deserialize<cv::GRunArgs, AdapterTypes...>() "
|
||||
"should be used"));
|
||||
return is;
|
||||
}
|
||||
|
||||
IOStream& operator<< (IOStream& os, const cv::MediaFrame &frame) {
|
||||
frame.serialize(os);
|
||||
return os;
|
||||
}
|
||||
IIStream& operator>> (IIStream& is, cv::MediaFrame &) {
|
||||
IIStream& operator>> (IIStream&, cv::MediaFrame &) {
|
||||
util::throw_error(std::logic_error("operator>> for MediaFrame should never be called. "
|
||||
"Instead, cv::gapi::deserialize<cv::GRunArgs, AdapterTypes...>() "
|
||||
"should be used"));
|
||||
return is;
|
||||
}
|
||||
|
||||
namespace
|
||||
|
|
@ -400,22 +398,19 @@ IOStream& operator<< (IOStream& os, const cv::UMat &)
|
|||
GAPI_Error("Serialization: Unsupported << for UMat");
|
||||
return os;
|
||||
}
|
||||
IIStream& operator >> (IIStream& is, cv::UMat &)
|
||||
IIStream& operator >> (IIStream&, cv::UMat &)
|
||||
{
|
||||
GAPI_Error("Serialization: Unsupported >> for UMat");
|
||||
return is;
|
||||
}
|
||||
#endif // !defined(GAPI_STANDALONE)
|
||||
|
||||
IOStream& operator<< (IOStream& os, const cv::gapi::wip::IStreamSource::Ptr &)
|
||||
IOStream& operator<< (IOStream&, const cv::gapi::wip::IStreamSource::Ptr &)
|
||||
{
|
||||
GAPI_Error("Serialization: Unsupported << for IStreamSource::Ptr");
|
||||
return os;
|
||||
}
|
||||
IIStream& operator >> (IIStream& is, cv::gapi::wip::IStreamSource::Ptr &)
|
||||
IIStream& operator >> (IIStream&, cv::gapi::wip::IStreamSource::Ptr &)
|
||||
{
|
||||
GAPI_Assert("Serialization: Unsupported >> for IStreamSource::Ptr");
|
||||
return is;
|
||||
GAPI_Error("Serialization: Unsupported >> for IStreamSource::Ptr");
|
||||
}
|
||||
|
||||
namespace
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ static int maxLineConsumption(const cv::GFluidKernel::Kind kind, int window, int
|
|||
}
|
||||
} break;
|
||||
case cv::GFluidKernel::Kind::YUV420toRGB: return inPort == 0 ? 2 : 1; break;
|
||||
default: GAPI_Error("InternalError"); return 0;
|
||||
default: GAPI_Error("InternalError");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ static int borderSize(const cv::GFluidKernel::Kind kind, int window)
|
|||
// Resize never reads from border pixels
|
||||
case cv::GFluidKernel::Kind::Resize: return 0; break;
|
||||
case cv::GFluidKernel::Kind::YUV420toRGB: return 0; break;
|
||||
default: GAPI_Error("InternalError"); return 0;
|
||||
default: GAPI_Error("InternalError");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ void fillBorderConstant(int borderSize, cv::Scalar borderValue, cv::Mat& mat)
|
|||
case CV_16S: return &fillConstBorderRow< int16_t>; break;
|
||||
case CV_16U: return &fillConstBorderRow<uint16_t>; break;
|
||||
case CV_32F: return &fillConstBorderRow< float >; break;
|
||||
default: GAPI_Error("InternalError"); return &fillConstBorderRow<uint8_t>;
|
||||
default: GAPI_Error("InternalError");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1830,7 +1830,6 @@ bool cv::gimpl::GStreamingExecutor::pull(cv::GRunArgsP &&outs)
|
|||
default:
|
||||
GAPI_Error("Unsupported cmd type in pull");
|
||||
}
|
||||
GAPI_Error("Unreachable code");
|
||||
}
|
||||
|
||||
bool cv::gimpl::GStreamingExecutor::pull(cv::GOptRunArgsP &&outs)
|
||||
|
|
|
|||
|
|
@ -327,7 +327,6 @@ public:
|
|||
|
||||
if (m_curr_frame_id % m_throw_every_nth_frame == 0) {
|
||||
throw std::logic_error(InvalidSource::exception_msg());
|
||||
return true;
|
||||
} else {
|
||||
d = cv::Mat(m_mat);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user