1
0
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:
Alexander Alekhin
2018-04-23 14:32:40 +03:00
parent 9615f8c994
commit 4cbec82ac1
15 changed files with 9 additions and 105 deletions
-6
View File
@@ -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) );