Skip to content

Commit

Permalink
Add include guards around SG_PATH_CHAR
Browse files Browse the repository at this point in the history
Such that one can redefine it (for example for cross-platform consistency)
  • Loading branch information
nabijaczleweli committed Sep 14, 2015
1 parent 068c61a commit 722b909
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SimpleGlob.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ enum SG_FileType {
# define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#endif

#define SG_PATH_CHAR '\\'
#ifndef SG_PATH_CHAR
# define SG_PATH_CHAR '\\'
#endif

/*! @brief Windows glob implementation. */
template<class SOCHAR>
Expand Down Expand Up @@ -381,7 +383,9 @@ struct SimpleGlobBase

#else // !_WIN32

#define SG_PATH_CHAR '/'
#ifndef SG_PATH_CHAR
# define SG_PATH_CHAR '/'
#endif

/*! @brief Unix glob implementation. */
template<class SOCHAR>
Expand Down

0 comments on commit 722b909

Please sign in to comment.