app/lib: fixed c++98 compliance issues

This commit is contained in:
itsmattkc 2022-07-11 09:05:28 -07:00
parent 7ef15f4e42
commit dbdf9097a4
7 changed files with 15 additions and 6 deletions

View file

@ -1,5 +1,6 @@
#include "vector3edit.h" #include "vector3edit.h"
#include <float.h>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLabel> #include <QLabel>

View file

@ -7,7 +7,11 @@
#define LIBWEAVER_PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop)) #define LIBWEAVER_PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop))
#endif #endif
#ifdef _MSC_VER
#define LIBWEAVER_EXPORT __declspec(dllexport) #define LIBWEAVER_EXPORT __declspec(dllexport)
#else
#define LIBWEAVER_EXPORT
#endif
#if defined(_WIN32) #if defined(_WIN32)
#define LIBWEAVER_OS_WINDOWS #define LIBWEAVER_OS_WINDOWS

View file

@ -1,5 +1,7 @@
#include "core.h" #include "core.h"
#include <algorithm>
namespace si { namespace si {
Core::Core() Core::Core()

View file

@ -4,6 +4,7 @@
#include <vector> #include <vector>
#include "common.h" #include "common.h"
#include "types.h"
namespace si { namespace si {

View file

@ -74,11 +74,11 @@ bool Interleaf::ParseStream(Chunk *chunk)
Chunk *list = static_cast<Chunk*>(chunk->GetChildAt(1)); Chunk *list = static_cast<Chunk*>(chunk->GetChildAt(1));
if (list) { if (list) {
using ChunkMap = std::map<uint32_t, std::vector<bytearray> >; typedef std::map<uint32_t, Object::ChunkedData> ChunkMap;
ChunkMap data; ChunkMap data;
for (Core *chunk : list->GetChildren()) { for (Children::const_iterator it=list->GetChildren().begin(); it!=list->GetChildren().end(); it++) {
Chunk *mxch = static_cast<Chunk*>(chunk); Chunk *mxch = static_cast<Chunk*>(*it);
if (mxch->id() == Chunk::TYPE_pad_) { if (mxch->id() == Chunk::TYPE_pad_) {
// Ignore this chunk // Ignore this chunk
} else if (mxch->id() == Chunk::TYPE_MxCh) { } else if (mxch->id() == Chunk::TYPE_MxCh) {

View file

@ -10,7 +10,7 @@ namespace si {
class Object : public Core class Object : public Core
{ {
public: public:
using ChunkedData = std::vector<bytearray>; typedef std::vector<bytearray> ChunkedData;
Object(); Object();

View file

@ -1,6 +1,7 @@
#ifndef TYPES_H #ifndef TYPES_H
#define TYPES_H #define TYPES_H
#include <cstring>
#include <map> #include <map>
#include <string> #include <string>
#include <vector> #include <vector>
@ -24,7 +25,7 @@ namespace si {
class bytearray : public std::vector<char> class bytearray : public std::vector<char>
{ {
public: public:
bytearray() = default; bytearray(){}
template <typename T> template <typename T>
T *cast() { return reinterpret_cast<T*>(data()); } T *cast() { return reinterpret_cast<T*>(data()); }
@ -138,7 +139,7 @@ private:
}; };
using DataMap = std::map<std::string, Data>; typedef std::map<std::string, Data> DataMap;
} }