Fix more gcc compilation issues

This commit is contained in:
Jan
2021-03-03 09:12:27 -08:00
parent a15fd17dfe
commit 1a45cf2107
84 changed files with 786 additions and 713 deletions

View File

@ -60,15 +60,15 @@ long Wrapper_Zlib_FileSeekRead(voidpf opaque, voidpf stream, const uLong offset,
switch (origin)
{
case ZLIB_FILEFUNC_SEEK_CUR:
file->seekg(offset, SEEK_CUR);
file->seekg(offset, std::ios_base::cur);
break;
case ZLIB_FILEFUNC_SEEK_END:
file->seekg(offset, SEEK_END);
file->seekg(offset, std::ios_base::end);
break;
case ZLIB_FILEFUNC_SEEK_SET:
file->seekg(offset, SEEK_SET);
file->seekg(offset, std::ios_base::beg);
break;
default:
@ -86,15 +86,15 @@ long Wrapper_Zlib_FileSeekWrite(voidpf opaque, voidpf stream, const uLong offset
switch (origin)
{
case ZLIB_FILEFUNC_SEEK_CUR:
file->seekp(offset, SEEK_CUR);
file->seekp(offset, std::ios_base::cur);
break;
case ZLIB_FILEFUNC_SEEK_END:
file->seekp(offset, SEEK_END);
file->seekp(offset, std::ios_base::end);
break;
case ZLIB_FILEFUNC_SEEK_SET:
file->seekp(offset, SEEK_SET);
file->seekp(offset, std::ios_base::beg);
break;
default:

View File

@ -2,6 +2,7 @@
#include <cassert>
#include <sstream>
#include <cstring>
const std::string InfoString::EMPTY_VALUE;
@ -146,7 +147,7 @@ void InfoStringFromStructConverterBase::FillFromStringBuffer(const std::string&
const size_t bufferSize)
{
const auto* str = reinterpret_cast<const char*>(reinterpret_cast<uintptr_t>(m_structure) + offset);
const auto strLen = strnlen_s(str, bufferSize);
const auto strLen = strnlen(str, bufferSize);
m_info_string.SetValueForKey(key, std::string(str, strLen));
}

View File

@ -3,12 +3,12 @@
#pragma once
#include <cassert>
#include "Utils/ClassUtils.h"
#include <streambuf>
#include <iostream>
#include <memory>
#include "Utils/ClassUtils.h"
template <class Elem, class Traits>
class basic_objbuf : public std::basic_streambuf<Elem, Traits>
{
@ -50,7 +50,7 @@ public:
void swap(basic_objstream& right) noexcept
{
if (this != _STD addressof(right))
if (this != std::addressof(right))
{
mybase::swap(right);
m_ob = std::move(right.m_ob);
@ -115,7 +115,7 @@ public:
void swap(basic_iobjstream& right) noexcept
{
if (this != _STD addressof(right))
if (this != std::addressof(right))
{
mybase::swap(right);
m_ob = std::move(right.m_ob);
@ -180,7 +180,7 @@ public:
void swap(basic_oobjstream& right) noexcept
{
if (this != _STD addressof(right))
if (this != std::addressof(right))
{
mybase::swap(right);
m_ob = std::move(right.m_ob);