[PhotonLib C++] Fix SetVersionCheckEnabled to actually disable version checking (#1323)

* change verifyversion to use member variable

* Revert "change verifyversion to use member variable"

This reverts commit 4439839c8f.

* Removed inline specifier for versioncheck variable

---------

Co-authored-by: Drew Williams <DrewW@iARx.com>
This commit is contained in:
Drew Williams
2024-05-19 20:36:44 -04:00
committed by GitHub
parent 9e58f5ed02
commit 74a051d721
2 changed files with 10 additions and 5 deletions

View File

@@ -152,9 +152,7 @@ class PhotonCamera {
std::optional<cv::Mat> GetCameraMatrix();
std::optional<cv::Mat> GetDistCoeffs();
inline static void SetVersionCheckEnabled(bool enabled) {
PhotonCamera::VERSION_CHECK_ENABLED = enabled;
}
static void SetVersionCheckEnabled(bool enabled);
std::shared_ptr<nt::NetworkTable> GetCameraTable() const { return rootTable; }
@@ -192,7 +190,7 @@ class PhotonCamera {
private:
units::second_t lastVersionCheckTime = 0_s;
inline static bool VERSION_CHECK_ENABLED = true;
static bool VERSION_CHECK_ENABLED;
inline static int InstanceCount = 0;
void VerifyVersion();