attempt to quench 'Checked Iterator' warnings in VS2015
This commit is contained in:
@@ -182,8 +182,8 @@ class VectorT {
|
|||||||
typename = typename std::enable_if<
|
typename = typename std::enable_if<
|
||||||
std::is_convertible<OtherScalar, Scalar>::value>>
|
std::is_convertible<OtherScalar, Scalar>::value>>
|
||||||
vector_type& operator=(const VectorT<OtherScalar, DIM>& _rhs) {
|
vector_type& operator=(const VectorT<OtherScalar, DIM>& _rhs) {
|
||||||
std::transform(_rhs.data(), _rhs.data() + DIM,
|
std::transform(_rhs.cbegin(), _rhs.cend(),
|
||||||
data(), [](OtherScalar rhs) {
|
this->begin(), [](OtherScalar rhs) {
|
||||||
return static_cast<Scalar>(std::move(rhs));
|
return static_cast<Scalar>(std::move(rhs));
|
||||||
});
|
});
|
||||||
return *this;
|
return *this;
|
||||||
@@ -193,7 +193,7 @@ class VectorT {
|
|||||||
Scalar* data() { return values_.data(); }
|
Scalar* data() { return values_.data(); }
|
||||||
|
|
||||||
/// access to const Scalar array
|
/// access to const Scalar array
|
||||||
const Scalar *data() const { return values_.data(); }
|
const Scalar* data() const { return values_.data(); }
|
||||||
|
|
||||||
//----------------------------------------------------------- element access
|
//----------------------------------------------------------- element access
|
||||||
|
|
||||||
@@ -382,8 +382,8 @@ class VectorT {
|
|||||||
auto operator|(const VectorT<OtherScalar, DIM>& _rhs) const ->
|
auto operator|(const VectorT<OtherScalar, DIM>& _rhs) const ->
|
||||||
decltype(*this->data() * *_rhs.data()) {
|
decltype(*this->data() * *_rhs.data()) {
|
||||||
|
|
||||||
return std::inner_product(data() + 1, data() + DIM, _rhs.data() + 1,
|
return std::inner_product(begin(), begin() + DIM, _rhs.begin() + 1,
|
||||||
*data() * *_rhs.data());
|
*begin() * *_rhs.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------ euclidean norm
|
//------------------------------------------------------------ euclidean norm
|
||||||
@@ -604,7 +604,7 @@ class VectorT {
|
|||||||
template<typename Functor>
|
template<typename Functor>
|
||||||
inline vector_type apply(const Functor& _func) const {
|
inline vector_type apply(const Functor& _func) const {
|
||||||
vector_type result;
|
vector_type result;
|
||||||
std::transform(result.values_.begin(), result.values_.end(),
|
std::transform(result.values_.cbegin(), result.values_.cend(),
|
||||||
result.values_.begin(), _func);
|
result.values_.begin(), _func);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user