Skip to content

Commit

Permalink
made it so that mselegacyhelpers.h should be compilable as "straight …
Browse files Browse the repository at this point in the history
…C" code when the safety mechanisms are disabled
  • Loading branch information
xxxx committed Nov 11, 2018
1 parent 328cde2 commit 770ba94
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions mselegacyhelpers.h
Expand Up @@ -14,18 +14,18 @@

#ifndef MSE_LEGACYHELPERS_DISABLED
#include "msepoly.h"
#endif // !MSE_LEGACYHELPERS_DISABLED

#include <cstring>
#else // !MSE_LEGACYHELPERS_DISABLED
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#endif // !MSE_LEGACYHELPERS_DISABLED

#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable : 4100 4456 4189 4127 )
#endif /*_MSC_VER*/

namespace mse {
namespace lh {

#ifdef MSE_LEGACYHELPERS_DISABLED

#define MSE_LH_FIXED_ARRAY_TYPE_PREFIX(size)
Expand Down Expand Up @@ -72,7 +72,8 @@ namespace mse {
#define MSE_LH_MEMCPY(destination, source, num_bytes) mse::lh::CMemF< mse::TNullableAnyRandomAccessIterator<typename std::remove_reference<decltype((destination)[0])>::type> >::memcpy(destination, source, num_bytes)
#define MSE_LH_MEMSET(ptr, value, num_bytes) mse::lh::CMemF< mse::TNullableAnyRandomAccessIterator<typename std::remove_reference<decltype((ptr)[0])>::type> >::memset(ptr, value, num_bytes)

#endif /*MSE_LEGACYHELPERS_DISABLED*/
namespace mse {
namespace lh {

template <typename _Ty>
class TOpaqueWrapper {
Expand Down Expand Up @@ -342,10 +343,11 @@ namespace mse {
CMemF< mse::TNullableAnyRandomAccessIterator<_Ty> >::memset(ptr, value, num_bytes);
}
};

}
}

#endif /*MSE_LEGACYHELPERS_DISABLED*/

#ifdef _MSC_VER
#pragma warning( pop )
#endif /*_MSC_VER*/
Expand Down

0 comments on commit 770ba94

Please sign in to comment.