Skip to content

Commit

Permalink
Fix several places where we are checking for WIN32 when we should be …
Browse files Browse the repository at this point in the history
…checking for MSVC (#248)

Part of #247
  • Loading branch information
asmaloney authored Apr 21, 2023
1 parent 45df6cf commit 458b489
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/E57ExportHeader.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include( GenerateExportHeader )

set( comment "\r
// Windows DLLs can't include the extern keyword when declaring templates \r
#ifdef _WIN32 \r
#ifdef _MSC_VER \r
#define TEMPLATE_EXTERN \r
#else \r
#define TEMPLATE_EXTERN extern \r
Expand Down
4 changes: 2 additions & 2 deletions src/CheckedFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
// This is fixed in a newer version of CRCpp.
// https://github.com/d-bahr/CRCpp/issues/17
// TODO: Remove when new CRCpp is released.
#if defined( WIN32 ) || defined( _WIN32 ) || defined( WINCE )
#if defined( _MSC_VER )
// Disable warning about "conditional expression is constant".
#pragma warning( push )
#pragma warning( disable : 4127 )
#endif
#include "CRC.h"
#if defined( WIN32 ) || defined( _WIN32 ) || defined( WINCE )
#if defined( _MSC_VER )
#pragma warning( pop )
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/E57SimpleData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ namespace e57
*this = Data3DPointsData_t<COORDTYPE>();
}

#if defined( WIN32 ) || defined( _WIN32 ) || defined( WINCE )
#if defined( _MSC_VER )
template struct E57_DLL Data3DPointsData_t<float>;
template struct E57_DLL Data3DPointsData_t<double>;
#else
Expand Down

0 comments on commit 458b489

Please sign in to comment.