removed const qualifier (it produces warnings)

This commit is contained in:
Vladislav Vinogradov 2013-04-18 10:27:56 +04:00
parent 0ce10532b3
commit 6d735c11c6
6 changed files with 54 additions and 54 deletions

View File

@ -73,8 +73,8 @@ namespace cv { namespace gpu { namespace cudev
return (x >= 0 && x < width) ? saturate_cast<D>(data[x]) : val; return (x >= 0 && x < width) ? saturate_cast<D>(data[x]) : val;
} }
const int width; int width;
const D val; D val;
}; };
template <typename D> struct BrdColConstant template <typename D> struct BrdColConstant
@ -98,8 +98,8 @@ namespace cv { namespace gpu { namespace cudev
return (y >= 0 && y < height) ? saturate_cast<D>(*(const T*)((const char*)data + y * step)) : val; return (y >= 0 && y < height) ? saturate_cast<D>(*(const T*)((const char*)data + y * step)) : val;
} }
const int height; int height;
const D val; D val;
}; };
template <typename D> struct BrdConstant template <typename D> struct BrdConstant
@ -120,9 +120,9 @@ namespace cv { namespace gpu { namespace cudev
return (x >= 0 && x < width && y >= 0 && y < height) ? saturate_cast<D>(src(y, x)) : val; return (x >= 0 && x < width && y >= 0 && y < height) ? saturate_cast<D>(src(y, x)) : val;
} }
const int height; int height;
const int width; int width;
const D val; D val;
}; };
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
@ -165,7 +165,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(data[idx_col(x)]); return saturate_cast<D>(data[idx_col(x)]);
} }
const int last_col; int last_col;
}; };
template <typename D> struct BrdColReplicate template <typename D> struct BrdColReplicate
@ -205,7 +205,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(*(const T*)((const char*)data + idx_row(y) * step)); return saturate_cast<D>(*(const T*)((const char*)data + idx_row(y) * step));
} }
const int last_row; int last_row;
}; };
template <typename D> struct BrdReplicate template <typename D> struct BrdReplicate
@ -255,8 +255,8 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(src(idx_row(y), idx_col(x))); return saturate_cast<D>(src(idx_row(y), idx_col(x)));
} }
const int last_row; int last_row;
const int last_col; int last_col;
}; };
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
@ -299,7 +299,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(data[idx_col(x)]); return saturate_cast<D>(data[idx_col(x)]);
} }
const int last_col; int last_col;
}; };
template <typename D> struct BrdColReflect101 template <typename D> struct BrdColReflect101
@ -339,7 +339,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(*(const D*)((const char*)data + idx_row(y) * step)); return saturate_cast<D>(*(const D*)((const char*)data + idx_row(y) * step));
} }
const int last_row; int last_row;
}; };
template <typename D> struct BrdReflect101 template <typename D> struct BrdReflect101
@ -389,8 +389,8 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(src(idx_row(y), idx_col(x))); return saturate_cast<D>(src(idx_row(y), idx_col(x)));
} }
const int last_row; int last_row;
const int last_col; int last_col;
}; };
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
@ -433,7 +433,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(data[idx_col(x)]); return saturate_cast<D>(data[idx_col(x)]);
} }
const int last_col; int last_col;
}; };
template <typename D> struct BrdColReflect template <typename D> struct BrdColReflect
@ -473,7 +473,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(*(const D*)((const char*)data + idx_row(y) * step)); return saturate_cast<D>(*(const D*)((const char*)data + idx_row(y) * step));
} }
const int last_row; int last_row;
}; };
template <typename D> struct BrdReflect template <typename D> struct BrdReflect
@ -523,8 +523,8 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(src(idx_row(y), idx_col(x))); return saturate_cast<D>(src(idx_row(y), idx_col(x)));
} }
const int last_row; int last_row;
const int last_col; int last_col;
}; };
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
@ -567,7 +567,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(data[idx_col(x)]); return saturate_cast<D>(data[idx_col(x)]);
} }
const int width; int width;
}; };
template <typename D> struct BrdColWrap template <typename D> struct BrdColWrap
@ -607,7 +607,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(*(const D*)((const char*)data + idx_row(y) * step)); return saturate_cast<D>(*(const D*)((const char*)data + idx_row(y) * step));
} }
const int height; int height;
}; };
template <typename D> struct BrdWrap template <typename D> struct BrdWrap
@ -664,8 +664,8 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<D>(src(idx_row(y), idx_col(x))); return saturate_cast<D>(src(idx_row(y), idx_col(x)));
} }
const int height; int height;
const int width; int width;
}; };
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
@ -683,8 +683,8 @@ namespace cv { namespace gpu { namespace cudev
return b.at(y, x, ptr); return b.at(y, x, ptr);
} }
const Ptr2D ptr; Ptr2D ptr;
const B b; B b;
}; };
// under win32 there is some bug with templated types that passed as kernel parameters // under win32 there is some bug with templated types that passed as kernel parameters
@ -704,10 +704,10 @@ namespace cv { namespace gpu { namespace cudev
return (x >= 0 && x < width && y >= 0 && y < height) ? saturate_cast<D>(src(y, x)) : val; return (x >= 0 && x < width && y >= 0 && y < height) ? saturate_cast<D>(src(y, x)) : val;
} }
const Ptr2D src; Ptr2D src;
const int height; int height;
const int width; int width;
const D val; D val;
}; };
}}} // namespace cv { namespace gpu { namespace cudev }}} // namespace cv { namespace gpu { namespace cudev

View File

@ -67,7 +67,7 @@ namespace cv { namespace gpu { namespace cudev
return src(__float2int_rz(y), __float2int_rz(x)); return src(__float2int_rz(y), __float2int_rz(x));
} }
const Ptr2D src; Ptr2D src;
}; };
template <typename Ptr2D> struct LinearFilter template <typename Ptr2D> struct LinearFilter
@ -107,7 +107,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<elem_type>(out); return saturate_cast<elem_type>(out);
} }
const Ptr2D src; Ptr2D src;
}; };
template <typename Ptr2D> struct CubicFilter template <typename Ptr2D> struct CubicFilter
@ -166,7 +166,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<elem_type>(res); return saturate_cast<elem_type>(res);
} }
const Ptr2D src; Ptr2D src;
}; };
// for integer scaling // for integer scaling
template <typename Ptr2D> struct IntegerAreaFilter template <typename Ptr2D> struct IntegerAreaFilter
@ -203,7 +203,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<elem_type>(out); return saturate_cast<elem_type>(out);
} }
const Ptr2D src; Ptr2D src;
float scale_x, scale_y ,scale; float scale_x, scale_y ,scale;
}; };
@ -269,7 +269,7 @@ namespace cv { namespace gpu { namespace cudev
return saturate_cast<elem_type>(out); return saturate_cast<elem_type>(out);
} }
const Ptr2D src; Ptr2D src;
float scale_x, scale_y; float scale_x, scale_y;
int width, haight; int width, haight;
}; };

View File

@ -552,8 +552,8 @@ namespace cv { namespace gpu { namespace cudev
__device__ __forceinline__ thresh_binary_func():unary_function<T, T>(){} __device__ __forceinline__ thresh_binary_func():unary_function<T, T>(){}
const T thresh; T thresh;
const T maxVal; T maxVal;
}; };
template <typename T> struct thresh_binary_inv_func : unary_function<T, T> template <typename T> struct thresh_binary_inv_func : unary_function<T, T>
@ -570,8 +570,8 @@ namespace cv { namespace gpu { namespace cudev
__device__ __forceinline__ thresh_binary_inv_func():unary_function<T, T>(){} __device__ __forceinline__ thresh_binary_inv_func():unary_function<T, T>(){}
const T thresh; T thresh;
const T maxVal; T maxVal;
}; };
template <typename T> struct thresh_trunc_func : unary_function<T, T> template <typename T> struct thresh_trunc_func : unary_function<T, T>
@ -588,7 +588,7 @@ namespace cv { namespace gpu { namespace cudev
__device__ __forceinline__ thresh_trunc_func():unary_function<T, T>(){} __device__ __forceinline__ thresh_trunc_func():unary_function<T, T>(){}
const T thresh; T thresh;
}; };
template <typename T> struct thresh_to_zero_func : unary_function<T, T> template <typename T> struct thresh_to_zero_func : unary_function<T, T>
@ -604,7 +604,7 @@ namespace cv { namespace gpu { namespace cudev
__device__ __forceinline__ thresh_to_zero_func():unary_function<T, T>(){} __device__ __forceinline__ thresh_to_zero_func():unary_function<T, T>(){}
const T thresh; T thresh;
}; };
template <typename T> struct thresh_to_zero_inv_func : unary_function<T, T> template <typename T> struct thresh_to_zero_inv_func : unary_function<T, T>
@ -620,7 +620,7 @@ namespace cv { namespace gpu { namespace cudev
__device__ __forceinline__ thresh_to_zero_inv_func():unary_function<T, T>(){} __device__ __forceinline__ thresh_to_zero_inv_func():unary_function<T, T>(){}
const T thresh; T thresh;
}; };
//bound!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ============> //bound!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ============>
// Function Object Adaptors // Function Object Adaptors
@ -636,7 +636,7 @@ namespace cv { namespace gpu { namespace cudev
__device__ __forceinline__ unary_negate(const unary_negate& other) : unary_function<typename Predicate::argument_type, bool>(){} __device__ __forceinline__ unary_negate(const unary_negate& other) : unary_function<typename Predicate::argument_type, bool>(){}
__device__ __forceinline__ unary_negate() : unary_function<typename Predicate::argument_type, bool>(){} __device__ __forceinline__ unary_negate() : unary_function<typename Predicate::argument_type, bool>(){}
const Predicate pred; Predicate pred;
}; };
template <typename Predicate> __host__ __device__ __forceinline__ unary_negate<Predicate> not1(const Predicate& pred) template <typename Predicate> __host__ __device__ __forceinline__ unary_negate<Predicate> not1(const Predicate& pred)
@ -659,7 +659,7 @@ namespace cv { namespace gpu { namespace cudev
__device__ __forceinline__ binary_negate() : __device__ __forceinline__ binary_negate() :
binary_function<typename Predicate::first_argument_type, typename Predicate::second_argument_type, bool>(){} binary_function<typename Predicate::first_argument_type, typename Predicate::second_argument_type, bool>(){}
const Predicate pred; Predicate pred;
}; };
template <typename BinaryPredicate> __host__ __device__ __forceinline__ binary_negate<BinaryPredicate> not2(const BinaryPredicate& pred) template <typename BinaryPredicate> __host__ __device__ __forceinline__ binary_negate<BinaryPredicate> not2(const BinaryPredicate& pred)
@ -679,8 +679,8 @@ namespace cv { namespace gpu { namespace cudev
__device__ __forceinline__ binder1st(const binder1st& other) : __device__ __forceinline__ binder1st(const binder1st& other) :
unary_function<typename Op::second_argument_type, typename Op::result_type>(){} unary_function<typename Op::second_argument_type, typename Op::result_type>(){}
const Op op; Op op;
const typename Op::first_argument_type arg1; typename Op::first_argument_type arg1;
}; };
template <typename Op, typename T> __host__ __device__ __forceinline__ binder1st<Op> bind1st(const Op& op, const T& x) template <typename Op, typename T> __host__ __device__ __forceinline__ binder1st<Op> bind1st(const Op& op, const T& x)
@ -700,8 +700,8 @@ namespace cv { namespace gpu { namespace cudev
__device__ __forceinline__ binder2nd(const binder2nd& other) : __device__ __forceinline__ binder2nd(const binder2nd& other) :
unary_function<typename Op::first_argument_type, typename Op::result_type>(), op(other.op), arg2(other.arg2){} unary_function<typename Op::first_argument_type, typename Op::result_type>(), op(other.op), arg2(other.arg2){}
const Op op; Op op;
const typename Op::second_argument_type arg2; typename Op::second_argument_type arg2;
}; };
template <typename Op, typename T> __host__ __device__ __forceinline__ binder2nd<Op> bind2nd(const Op& op, const T& x) template <typename Op, typename T> __host__ __device__ __forceinline__ binder2nd<Op> bind2nd(const Op& op, const T& x)

View File

@ -72,7 +72,7 @@ namespace arithm
template <class Op, typename T> template <class Op, typename T>
struct CmpScalar<Op, T, 1> : unary_function<T, uchar> struct CmpScalar<Op, T, 1> : unary_function<T, uchar>
{ {
const T val; T val;
__host__ explicit CmpScalar(T val_) : val(val_) {} __host__ explicit CmpScalar(T val_) : val(val_) {}
@ -85,7 +85,7 @@ namespace arithm
template <class Op, typename T> template <class Op, typename T>
struct CmpScalar<Op, T, 2> : unary_function<TYPE_VEC(T, 2), TYPE_VEC(uchar, 2)> struct CmpScalar<Op, T, 2> : unary_function<TYPE_VEC(T, 2), TYPE_VEC(uchar, 2)>
{ {
const TYPE_VEC(T, 2) val; TYPE_VEC(T, 2) val;
__host__ explicit CmpScalar(TYPE_VEC(T, 2) val_) : val(val_) {} __host__ explicit CmpScalar(TYPE_VEC(T, 2) val_) : val(val_) {}
@ -98,7 +98,7 @@ namespace arithm
template <class Op, typename T> template <class Op, typename T>
struct CmpScalar<Op, T, 3> : unary_function<TYPE_VEC(T, 3), TYPE_VEC(uchar, 3)> struct CmpScalar<Op, T, 3> : unary_function<TYPE_VEC(T, 3), TYPE_VEC(uchar, 3)>
{ {
const TYPE_VEC(T, 3) val; TYPE_VEC(T, 3) val;
__host__ explicit CmpScalar(TYPE_VEC(T, 3) val_) : val(val_) {} __host__ explicit CmpScalar(TYPE_VEC(T, 3) val_) : val(val_) {}
@ -111,7 +111,7 @@ namespace arithm
template <class Op, typename T> template <class Op, typename T>
struct CmpScalar<Op, T, 4> : unary_function<TYPE_VEC(T, 4), TYPE_VEC(uchar, 4)> struct CmpScalar<Op, T, 4> : unary_function<TYPE_VEC(T, 4), TYPE_VEC(uchar, 4)>
{ {
const TYPE_VEC(T, 4) val; TYPE_VEC(T, 4) val;
__host__ explicit CmpScalar(TYPE_VEC(T, 4) val_) : val(val_) {} __host__ explicit CmpScalar(TYPE_VEC(T, 4) val_) : val(val_) {}

View File

@ -253,7 +253,7 @@ namespace arithm
}; };
template<> struct PowOp<float> : unary_function<float, float> template<> struct PowOp<float> : unary_function<float, float>
{ {
const float power; float power;
PowOp(double power_) : power(static_cast<float>(power_)) {} PowOp(double power_) : power(static_cast<float>(power_)) {}

View File

@ -94,8 +94,8 @@ namespace canny
texture<uchar, cudaTextureType2D, cudaReadModeElementType> tex_src(false, cudaFilterModePoint, cudaAddressModeClamp); texture<uchar, cudaTextureType2D, cudaReadModeElementType> tex_src(false, cudaFilterModePoint, cudaAddressModeClamp);
struct SrcTex struct SrcTex
{ {
const int xoff; int xoff;
const int yoff; int yoff;
__host__ SrcTex(int _xoff, int _yoff) : xoff(_xoff), yoff(_yoff) {} __host__ SrcTex(int _xoff, int _yoff) : xoff(_xoff), yoff(_yoff) {}
__device__ __forceinline__ int operator ()(int y, int x) const __device__ __forceinline__ int operator ()(int y, int x) const