package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
2.1 KiB

diff --git a/SimTKcommon/BigMatrix/include/SimTKcommon/internal/VectorIterator.h b/SimTKcommon/BigMatrix/include/SimTKcommon/internal/VectorIterator.h
index 79c07e61e..b454fcefc 100644
--- a/SimTKcommon/BigMatrix/include/SimTKcommon/internal/VectorIterator.h
+++ b/SimTKcommon/BigMatrix/include/SimTKcommon/internal/VectorIterator.h
@@ -73,14 +73,14 @@ class VectorIterator {
same vector as the source iterator. **/
VectorIterator& operator=(const VectorIterator& source) = default;
- ELT& operator*() {
+ /** Dereference the iterator to access the element it points to. Note
+ that although the iterator may be const, it can still point to a
+ mutable element. **/
+ ELT& operator*() const {
assert (index >= 0 && index < vectorp->size());
return (*vectorp)[(int)index];
}
- ELT& operator[](ptrdiff_t i) {
- assert (i >= 0 && i < vectorp->size());
- return (*vectorp)[(int)i];
- }
+
VectorIterator& operator++() {
assert (index < vectorp->size());
++index;
diff --git a/SimTKcommon/Polynomial/src/cpoly.cpp b/SimTKcommon/Polynomial/src/cpoly.cpp
index 3b3b6f78d..d97b78c5a 100644
--- a/SimTKcommon/Polynomial/src/cpoly.cpp
+++ b/SimTKcommon/Polynomial/src/cpoly.cpp
@@ -602,7 +602,7 @@ T CPoly<T>::scale( const int nn, const T pt[], const T eta, const T infin, const
if( infin / sc > max ) sc = 1;
}
l = (int)( log( sc ) / log(base ) + 0.5 );
- fn_val = pow( base , l );
+ fn_val = T(std::pow( base , l )); // extraneous cast required by VS 16.8.2
return fn_val;
}
diff --git a/SimTKcommon/Polynomial/src/rpoly.cpp b/SimTKcommon/Polynomial/src/rpoly.cpp
index 10a399194..05afde29f 100644
--- a/SimTKcommon/Polynomial/src/rpoly.cpp
+++ b/SimTKcommon/Polynomial/src/rpoly.cpp
@@ -143,7 +143,7 @@ int RPoly<T>::findRoots(T *op, int degree, T *zeror, T *zeroi)
sc = smalno;
}
l = (int)(log(sc)/log(base) + 0.5);
- factor = pow(base*(T) 1.0,l);
+ factor = T(std::pow( base, l )); // extraneous cast required by VS 16.8.2
if (factor != 1.0) {
for (i=0;i<=n;i++)
p[i] = factor*p[i]; /* Scale polynomial. */