Fix MSVC build errors and warnings
This was SVN commit r6254.
This commit is contained in:
parent
8f6d3a75a5
commit
a3fb9051b6
@ -586,8 +586,15 @@ LibError debug_stl_get_container_info(const char* type_name, const u8* p, size_t
|
||||
size_t el_size, size_t* el_count, DebugStlIterator* el_iterator, void* it_mem)
|
||||
{
|
||||
#if MSC_VERSION >= 1400
|
||||
UNUSED2(type_name);
|
||||
UNUSED2(p);
|
||||
UNUSED2(size);
|
||||
UNUSED2(el_size);
|
||||
UNUSED2(el_count);
|
||||
UNUSED2(el_iterator);
|
||||
UNUSED2(it_mem);
|
||||
return ERR::STL_CNT_UNKNOWN; // NOWARN
|
||||
#endif
|
||||
#else
|
||||
|
||||
bool handled = false, IsValid = false;
|
||||
#define CONTAINER(name, type_name_pattern)\
|
||||
@ -641,4 +648,6 @@ LibError debug_stl_get_container_info(const char* type_name, const u8* p, size_t
|
||||
if(!IsValid)
|
||||
return ERR::STL_CNT_INVALID; // NOWARN
|
||||
return INFO::OK;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -20,28 +20,28 @@ static const size_t SECTOR_SIZE = 4*KiB;
|
||||
|
||||
|
||||
template<class T>
|
||||
bool IsAligned_Data(T* address)
|
||||
inline bool IsAligned_Data(T* address)
|
||||
{
|
||||
return IsAligned((uintptr_t)address, SECTOR_SIZE);
|
||||
}
|
||||
|
||||
static bool IsAligned_Offset(off_t ofs)
|
||||
inline bool IsAligned_Offset(off_t ofs)
|
||||
{
|
||||
return IsAligned(ofs, BLOCK_SIZE);
|
||||
}
|
||||
|
||||
|
||||
static off_t AlignedOffset(off_t ofs)
|
||||
inline off_t AlignedOffset(off_t ofs)
|
||||
{
|
||||
return round_down(ofs, (off_t)BLOCK_SIZE);
|
||||
}
|
||||
|
||||
static off_t AlignedSize(off_t size)
|
||||
inline off_t AlignedSize(off_t size)
|
||||
{
|
||||
return round_up(size, (off_t)BLOCK_SIZE);
|
||||
}
|
||||
|
||||
static off_t PaddedSize(off_t size, off_t ofs)
|
||||
inline off_t PaddedSize(off_t size, off_t ofs)
|
||||
{
|
||||
return round_up(size + ofs - AlignedOffset(ofs), (off_t)BLOCK_SIZE);
|
||||
}
|
||||
|
@ -111,9 +111,9 @@ template<int x> struct static_assert_test{};
|
||||
sizeof(REQUIRE_TYPE_TO_BE_SHAREABLE_FAILURE< T, (bool)(Shareable<T>::TypeIsShareable) >)> \
|
||||
static_assert_typedef_
|
||||
|
||||
template <typename T> const T* empty_str();
|
||||
template <> const char* empty_str() { return ""; }
|
||||
template <> const wchar_t* empty_str() { return L""; }
|
||||
template <typename T> inline const T* empty_str();
|
||||
template <> inline const char* empty_str() { return ""; }
|
||||
template <> inline const wchar_t* empty_str() { return L""; }
|
||||
|
||||
// Shareable strings:
|
||||
template<typename C> class Shareable< std::basic_string<C> >
|
||||
|
Loading…
Reference in New Issue
Block a user