Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several places where we are checking for WIN32 when we should be checking for MSVC #248

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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