Skip to content

Commit

Permalink
VS2019 std::filesystem name change
Browse files Browse the repository at this point in the history
VS2019 changed std::experimental::filesystme to std::filesystem
so condition on windows on MSC_VER to use a different name.

Closes surge-synthesizer#1433
  • Loading branch information
baconpaul committed Dec 19, 2019
1 parent a696776 commit 90efc8c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/common/SurgeStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@

#include "Tunings.h"


#if WINDOWS && ( _MSC_VER >= 1920 )
// vs2019
namespace fs = std::filesystem;
#else
namespace fs = std::experimental::filesystem;
#endif

#if WINDOWS
#define PATH_SEPARATOR '\\'
Expand Down
5 changes: 5 additions & 0 deletions src/common/SurgeSynthesizerIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
#include <iterator>
#include "UserInteractions.h"

#if WINDOWS && ( _MSC_VER >= 1920 )
// vs2019
namespace fs = std::filesystem;
#else
namespace fs = std::experimental::filesystem;
#endif

#if AU
#include "aulayer.h"
Expand Down
5 changes: 5 additions & 0 deletions src/common/UserDefaults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
#include <filesystem>
#endif

#if WINDOWS && ( _MSC_VER >= 1920 )
// vs2019
namespace fs = std::filesystem;
#else
namespace fs = std::experimental::filesystem;
#endif

namespace Surge
{
Expand Down
5 changes: 5 additions & 0 deletions src/common/WavSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
#include <filesystem>
#endif

#if WINDOWS && ( _MSC_VER >= 1920 )
// vs2019
namespace fs = std::filesystem;
#else
namespace fs = std::experimental::filesystem;
#endif

// Sigh - lets write a portable ntol by hand
unsigned int pl_int(char *d)
Expand Down
5 changes: 5 additions & 0 deletions src/common/gui/COscillatorDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@

using namespace VSTGUI;

#if WINDOWS && ( _MSC_VER >= 1920 )
// vs2019
namespace fs = std::filesystem;
#else
namespace fs = std::experimental::filesystem;
#endif

const float disp_pitch = 90.15f - 48.f;
const int wtbheight = 12;
Expand Down
5 changes: 5 additions & 0 deletions src/common/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@
#include <filesystem>
#endif

#if WINDOWS && ( _MSC_VER >= 1920 )
// vs2019
namespace fs = std::filesystem;
#else
namespace fs = std::experimental::filesystem;
#endif


#if LINUX && TARGET_LV2
Expand Down

0 comments on commit 90efc8c

Please sign in to comment.