mirror of
https://github.com/autc04/Retro68.git
synced 2025-08-15 16:27:55 +00:00
silence warnings
This commit is contained in:
@@ -15,7 +15,7 @@ class Resource
|
|||||||
public:
|
public:
|
||||||
Resource() {}
|
Resource() {}
|
||||||
Resource(ResType type, int id, std::string data, std::string name = "", int attr = 0)
|
Resource(ResType type, int id, std::string data, std::string name = "", int attr = 0)
|
||||||
: type(type), id(id), data(data), name(name), attr(attr) {}
|
: type(type), id(id), name(name), data(data), attr(attr) {}
|
||||||
|
|
||||||
const std::string& getData() const { return data; }
|
const std::string& getData() const { return data; }
|
||||||
inline ResType getType() const { return type; }
|
inline ResType getType() const { return type; }
|
||||||
|
@@ -113,7 +113,7 @@ void SimpleField::compileString(ExprPtr expr, ResourceCompiler *compiler, bool p
|
|||||||
|
|
||||||
if(arrayCount || type == Type::char_)
|
if(arrayCount || type == Type::char_)
|
||||||
{
|
{
|
||||||
int requestedSize = type == Type::char_ ? 1 : arrayCount->evaluateInt(compiler);
|
unsigned requestedSize = type == Type::char_ ? 1 : arrayCount->evaluateInt(compiler);
|
||||||
if(requestedSize < str.size())
|
if(requestedSize < str.size())
|
||||||
str.erase(str.begin() + requestedSize, str.end());
|
str.erase(str.begin() + requestedSize, str.end());
|
||||||
else if(requestedSize > str.size())
|
else if(requestedSize > str.size())
|
||||||
@@ -166,6 +166,8 @@ void SimpleField::compileInt(ExprPtr expr, ResourceCompiler *compiler, bool preP
|
|||||||
case Type::longint:
|
case Type::longint:
|
||||||
bitSize = 32;
|
bitSize = 32;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int actualValue = 0;
|
int actualValue = 0;
|
||||||
@@ -193,6 +195,8 @@ void SimpleField::compileCompound(ExprPtr expr, ResourceCompiler *compiler, bool
|
|||||||
case Type::point:
|
case Type::point:
|
||||||
count = 2;
|
count = 2;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
CompoundExprPtr compound = std::dynamic_pointer_cast<CompoundExpr>(val);
|
CompoundExprPtr compound = std::dynamic_pointer_cast<CompoundExpr>(val);
|
||||||
@@ -281,7 +285,7 @@ void SwitchField::compile(ExprPtr expr, ResourceCompiler *compiler, bool prePass
|
|||||||
|
|
||||||
|
|
||||||
FillAlignField::FillAlignField(FillAlignField::Type type, bool isAlign, ExprPtr count)
|
FillAlignField::FillAlignField(FillAlignField::Type type, bool isAlign, ExprPtr count)
|
||||||
: type(type), isAlign(isAlign), count(count)
|
: type(type), count(count), isAlign(isAlign)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user