MissouriMRDT / Autonomy_Software

Found C-style array declaration in place of std::array or std::vector CXX-W2066
Anti-pattern
Major
4 days ago14 days old
do not declare C-style arrays, use std::array<> instead
43            std::vector<double> m_vRoverXPosition;
44            std::vector<double> m_vRoverYPosition;
45            time_t m_tStuckCheckTime;
46            double m_dStuckCheckLastPosition[2];47            bool m_bInitialized;
48            std::vector<TagDetector*> m_vTagDetectors;
49            statemachine::TimeIntervalBasedStuckDetector m_StuckDetector;
do not declare C-style arrays, use std::array<> instead
 65        std::tm* tLocalTime = std::localtime(&tCurrentTime);
 66
 67        // Format the current time in a format that can be used as a file name
 68        char cCurrentTime[80]; 69        size_t siTimeCharacters;
 70        siTimeCharacters = std::strftime(cCurrentTime, sizeof(cCurrentTime), "%Y%m%d-%H%M%S", tLocalTime);
 71        if (siTimeCharacters == 0)