Skip to content

Commit 9331902

Browse files
committed
Merge pull request #3421 from tomoaki0705:fix_warnings_4x
2 parents 325e6ab + f48a261 commit 9331902

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

modules/cudev/include/opencv2/cudev/ptr2d/texture.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ namespace cv { namespace cudev {
275275
{
276276
}
277277

278-
__host__ TextureOff(PtrStepSz<T> src, const int yoff = 0, const int xoff = 0, const bool normalizedCoords = false, const cudaTextureFilterMode filterMode = cudaFilterModePoint,
278+
__host__ TextureOff(PtrStepSz<T> src, const int yoff_ = 0, const int xoff_ = 0, const bool normalizedCoords = false, const cudaTextureFilterMode filterMode = cudaFilterModePoint,
279279
const cudaTextureAddressMode addressMode = cudaAddressModeClamp, const cudaTextureReadMode readMode = cudaReadModeElementType) :
280-
TextureOff(src.rows, src.cols, src.data, src.step, yoff, xoff, normalizedCoords, filterMode, addressMode, readMode)
280+
TextureOff(src.rows, src.cols, src.data, src.step, yoff_, xoff_, normalizedCoords, filterMode, addressMode, readMode)
281281
{
282282
}
283283

modules/xfeatures2d/src/cuda/surf.cu

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,21 @@ namespace cv { namespace cuda { namespace device
233233
__host__ Mask(cudev::TexturePtr<unsigned int> tex_): tex(tex_) {};
234234
__device__ bool check(int sum_i, int sum_j, int size)
235235
{
236-
if (!useMask) return true;
237-
float ratio = (float)size / 9.0f;
238-
236+
int dx1 = 0;
237+
int dy1 = 0;
238+
int dx2 = 0;
239+
int dy2 = 0;
240+
float ratio = 0;
239241
float d = 0;
242+
float t = 0;
240243

241-
int dx1 = __float2int_rn(ratio * c_DM[0]);
242-
int dy1 = __float2int_rn(ratio * c_DM[1]);
243-
int dx2 = __float2int_rn(ratio * c_DM[2]);
244-
int dy2 = __float2int_rn(ratio * c_DM[3]);
244+
if (!useMask) return true;
245+
ratio = (float)size / 9.0f;
246+
dx1 = __float2int_rn(ratio * c_DM[0]);
247+
dy1 = __float2int_rn(ratio * c_DM[1]);
248+
dx2 = __float2int_rn(ratio * c_DM[2]);
249+
dy2 = __float2int_rn(ratio * c_DM[3]);
245250

246-
float t = 0;
247251
t += tex(sum_i + dy1, sum_j + dx1);
248252
t -= tex(sum_i + dy2, sum_j + dx1);
249253
t -= tex(sum_i + dy1, sum_j + dx2);

0 commit comments

Comments
 (0)