Skip to content
Permalink
Browse files

restore fixes for MS build

  • Loading branch information
PeterPetrik authored and wonder-sk committed Jul 18, 2018
1 parent 21613cd commit f54a23e3c4e0bf245e5af9d67b78871e78d32293
@@ -27,7 +27,7 @@ struct HdfString
char data [HDF_MAX_NAME];
};

template <int TYPE> inline void hdfClose( hid_t id ) { assert( false ); }
template <int TYPE> inline void hdfClose( hid_t id ) { MDAL_UNUSED( id ); assert( false ); }
template <> inline void hdfClose<H5I_FILE>( hid_t id ) { H5Fclose( id ); }
template <> inline void hdfClose<H5I_GROUP>( hid_t id ) { H5Gclose( id ); }
template <> inline void hdfClose<H5I_DATASET>( hid_t id ) { H5Dclose( id ); }
@@ -8,6 +8,7 @@
#include "frmts/mdal_2dm.hpp"
#include "frmts/mdal_ascii_dat.hpp"
#include "frmts/mdal_binary_dat.hpp"
#include "mdal_utils.hpp"

#ifdef HAVE_HDF5
#include "frmts/mdal_xmdf.hpp"
@@ -4,6 +4,7 @@
*/

#include "mdal_utils.hpp"
#include <string>
#include <fstream>
#include <iostream>
#include <algorithm>
@@ -101,7 +102,14 @@ bool MDAL::contains( const std::string &str, const std::string &substr, Contains
auto it = std::search(
str.begin(), str.end(),
substr.begin(), substr.end(),
[]( char ch1, char ch2 ) { return std::toupper( ch1 ) == std::toupper( ch2 ); }
[]( char ch1, char ch2 )
{
#ifdef _MSC_VER
return toupper( ch1 ) == toupper( ch2 );
#else
return std::toupper( ch1 ) == std::toupper( ch2 );
#endif
}
);
return ( it != str.end() );
}
@@ -13,6 +13,9 @@

#include "mdal_data_model.hpp"

// avoid unused variable warnings
#define MDAL_UNUSED(x) (void)x;

namespace MDAL
{
// numbers

0 comments on commit f54a23e

Please sign in to comment.
You can’t perform that action at this time.