Update for C++17 and fix MSVC warnings (#1694)

* Update MSVC arguments
* Fix json allocator
* Fix simulation diamond
* Bump gtest
* Remove empty varargs in unit tests
* Replace test case with test suite
* Remove deprecation warning in optional
* Remove need for NOMIXMAX to be defined in wpilib headers
This commit is contained in:
Thad House
2019-05-31 13:43:32 -07:00
committed by Peter Johnson
parent fb1239a2ad
commit 221011494d
99 changed files with 534 additions and 398 deletions

View File

@@ -21,6 +21,12 @@
#include "cscore_c.h"
#ifdef _WIN32
// Disable uninitialized variable warnings
#pragma warning(push)
#pragma warning(disable : 26495)
#endif
namespace wpi {
class json;
} // namespace wpi
@@ -422,4 +428,9 @@ std::vector<std::string> GetNetworkInterfaces();
} // namespace cs
#ifdef _WIN32
// Disable uninitialized variable warnings
#pragma warning(pop)
#endif
#endif // CSCORE_CSCORE_CPP_H_

View File

@@ -51,7 +51,7 @@ class VideoProperty {
kEnum = CS_PROP_ENUM
};
VideoProperty() : m_handle(0), m_kind(kNone) {}
VideoProperty() : m_status(0), m_handle(0), m_kind(kNone) {}
std::string GetName() const;

View File

@@ -76,7 +76,7 @@ inline VideoProperty::VideoProperty(CS_Property handle) : m_handle(handle) {
}
inline VideoProperty::VideoProperty(CS_Property handle, Kind kind)
: m_handle(handle), m_kind(kind) {}
: m_status(0), m_handle(handle), m_kind(kind) {}
inline VideoSource::VideoSource(const VideoSource& source)
: m_handle(source.m_handle == 0 ? 0