mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
build: unreachable code after CV_Error()
This commit is contained in:
@@ -450,7 +450,6 @@ bool cv::cuda::Stream::queryIfComplete() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
return false;
|
||||
#else
|
||||
cudaError_t err = cudaStreamQuery(impl_->stream);
|
||||
|
||||
@@ -526,8 +525,6 @@ Stream& cv::cuda::Stream::Null()
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
static Stream stream;
|
||||
return stream;
|
||||
#else
|
||||
const int deviceId = getDevice();
|
||||
return initializer.getNullStream(deviceId);
|
||||
@@ -716,7 +713,6 @@ GpuMat cv::cuda::BufferPool::getBuffer(int rows, int cols, int type)
|
||||
(void) cols;
|
||||
(void) type;
|
||||
throw_no_cuda();
|
||||
return GpuMat();
|
||||
#else
|
||||
GpuMat buf(allocator_);
|
||||
buf.create(rows, cols, type);
|
||||
@@ -806,7 +802,6 @@ bool cv::cuda::Event::queryIfComplete() const
|
||||
{
|
||||
#ifndef HAVE_CUDA
|
||||
throw_no_cuda();
|
||||
return false;
|
||||
#else
|
||||
cudaError_t err = cudaEventQuery(impl_->event);
|
||||
|
||||
@@ -833,7 +828,6 @@ float cv::cuda::Event::elapsedTime(const Event& start, const Event& end)
|
||||
(void) start;
|
||||
(void) end;
|
||||
throw_no_cuda();
|
||||
return 0.0f;
|
||||
#else
|
||||
float ms;
|
||||
cudaSafeCall( cudaEventElapsedTime(&ms, start.impl_->event, end.impl_->event) );
|
||||
|
||||
Reference in New Issue
Block a user