mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
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:
committed by
Peter Johnson
parent
fb1239a2ad
commit
221011494d
@@ -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_
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user