diff --git a/OpenSim/Common/TableUtilities.cpp b/OpenSim/Common/TableUtilities.cpp index d5da41491b..a86d87398f 100644 --- a/OpenSim/Common/TableUtilities.cpp +++ b/OpenSim/Common/TableUtilities.cpp @@ -122,7 +122,7 @@ int TableUtilities::findStateLabelIndexInternal(const std::string* begin, } template -std::pair isUniform(const std::vector& x) { +bool isUniform(const std::vector& x) { // Initialize step as NaN T step = std::numeric_limits::quiet_NaN(); @@ -154,9 +154,8 @@ std::pair isUniform(const std::vector& x) { if (!tf && x.size() == 2) { tf = true; // Handle special case for two elements } - if (tf) { step = mean_step; } - return {tf, step}; + return tf; } void TableUtilities::filterLowpass( @@ -180,7 +179,7 @@ void TableUtilities::filterLowpass( OPENSIM_THROW_IF( dtMin < SimTK::Eps, Exception, "Storage cannot be resampled."); - const auto [uniformlySampled, sampleRate] = isUniform(time); + const bool uniformlySampled = isUniform(time); // Resample if the sampling interval is not uniform. if (!uniformlySampled) {