Skip to content

Commit 1288501

Browse files
authored
[cscore,hal] Remove VS 2019 16.4.0 workaround (#7201)
1 parent f23bece commit 1288501

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

cscore/src/main/native/cpp/HttpCameraImpl.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,7 @@ std::unique_ptr<PropertyImpl> HttpCameraImpl::CreateEmptyProperty(
458458
}
459459

460460
bool HttpCameraImpl::CacheProperties(CS_Status* status) const {
461-
#ifdef _MSC_VER // work around VS2019 16.4.0 bug
462-
std::scoped_lock<wpi::mutex> lock(m_mutex);
463-
#else
464461
std::scoped_lock lock(m_mutex);
465-
#endif
466462

467463
// Pretty typical set of video modes
468464
m_videoModes.clear();

cscore/src/main/native/cpp/UnlimitedHandleResource.h

-4
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ template <typename THandle, typename TStruct, int typeValue, typename TMutex>
7575
template <typename... Args>
7676
THandle UnlimitedHandleResource<THandle, TStruct, typeValue, TMutex>::Allocate(
7777
Args&&... args) {
78-
#ifdef _MSC_VER // work around VS2019 16.4.0 bug
79-
std::scoped_lock<TMutex> lock(m_handleMutex);
80-
#else
8178
std::scoped_lock sync(m_handleMutex);
82-
#endif
8379
size_t i;
8480
for (i = 0; i < m_structures.size(); i++) {
8581
if (m_structures[i] == nullptr) {

hal/src/main/native/include/hal/simulation/SimCallbackRegistry.h

-4
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,7 @@ class SimCallbackRegistry : public impl::SimCallbackRegistryBase {
7979

8080
template <typename... U>
8181
void Invoke(U&&... u) const {
82-
#ifdef _MSC_VER // work around VS2019 16.4.0 bug
83-
std::scoped_lock<wpi::recursive_spinlock> lock(m_mutex);
84-
#else
8582
std::scoped_lock lock(m_mutex);
86-
#endif
8783
if (m_callbacks) {
8884
const char* name = GetName();
8985
for (auto&& cb : *m_callbacks) {

hal/src/main/native/sim/HAL.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ class SimPeriodicCallbackRegistry : public impl::SimCallbackRegistryBase {
4444
}
4545

4646
void operator()() const {
47-
#ifdef _MSC_VER // work around VS2019 16.4.0 bug
48-
std::scoped_lock<wpi::recursive_spinlock> lock(m_mutex);
49-
#else
5047
std::scoped_lock lock(m_mutex);
51-
#endif
5248
if (m_callbacks) {
5349
for (auto&& cb : *m_callbacks) {
5450
reinterpret_cast<HALSIM_SimPeriodicCallback>(cb.callback)(cb.param);

0 commit comments

Comments
 (0)