[nostalgia] Enable and fix several warnings
This commit is contained in:
@@ -17,6 +17,8 @@ namespace studio {
|
||||
class JsonOperator {
|
||||
|
||||
public:
|
||||
virtual ~JsonOperator() = default;
|
||||
|
||||
virtual int op(QString fieldName, int *dest) = 0;
|
||||
|
||||
virtual int op(QString fieldName, bool *dest) = 0;
|
||||
|
@@ -55,15 +55,15 @@ int main(int argc, char **args) {
|
||||
int err = 0;
|
||||
QString json;
|
||||
TestStruct ts = {
|
||||
.Bool = true,
|
||||
.Int = 42,
|
||||
.Double = 42.42,
|
||||
.String = "Test String",
|
||||
.Struct = {
|
||||
.Bool = true,
|
||||
.Int = 42,
|
||||
.Double = 42.42,
|
||||
.String = "Test String"
|
||||
true,
|
||||
42,
|
||||
42.42,
|
||||
"Test String",
|
||||
{
|
||||
true,
|
||||
42,
|
||||
42.42,
|
||||
"Test String"
|
||||
}
|
||||
};
|
||||
TestStruct tsOut;
|
||||
|
@@ -28,12 +28,16 @@ struct Context {
|
||||
};
|
||||
|
||||
struct EditorMaker {
|
||||
virtual ~EditorMaker() = default;
|
||||
|
||||
virtual QWidget *make(QString path, const Context *ctx) = 0;
|
||||
};
|
||||
|
||||
class Plugin {
|
||||
|
||||
public:
|
||||
virtual ~Plugin() = default;
|
||||
|
||||
virtual QVector<WizardMaker> newWizards(const Context *ctx);
|
||||
|
||||
virtual QVector<WizardMaker> importWizards(const Context *ctx);
|
||||
|
@@ -35,7 +35,7 @@ int Project::openRomFs() {
|
||||
auto buff = std::make_unique<uint8_t[]>(buffSize);
|
||||
if (file.exists()) {
|
||||
file.open(QIODevice::ReadOnly);
|
||||
if (file.read((char*) buff.get(), buffSize) > 0) {
|
||||
if (file.read(reinterpret_cast<char*>(buff.get()), buffSize) > 0) {
|
||||
m_fsBuff = std::move(buff);
|
||||
if (m_fs.valid()) {
|
||||
return 0;
|
||||
|
@@ -66,13 +66,13 @@ int Project::writeObj(QString path, T *obj) const {
|
||||
|
||||
// write MetalClaw
|
||||
size_t mcSize = 0;
|
||||
err |= ox::writeMC((uint8_t*) buff.data(), buffLen, obj, &mcSize);
|
||||
err |= ox::writeMC(reinterpret_cast<uint8_t*>(buff.data()), buffLen, obj, &mcSize);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// write to FS
|
||||
err |= write(path, (uint8_t*) buff.data(), mcSize);
|
||||
err |= write(path, reinterpret_cast<uint8_t*>(buff.data()), mcSize);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ using namespace nostalgia::studio;
|
||||
using namespace ox;
|
||||
|
||||
int run(int argc, char **args) {
|
||||
ClArgs clargs(argc, (const char**) args);
|
||||
ClArgs clargs(argc, const_cast<const char**>(args));
|
||||
QString argProfilePath = clargs.getString("profile").c_str();
|
||||
|
||||
NostalgiaStudioProfile config;
|
||||
|
@@ -151,7 +151,7 @@ void MainWindow::setupProjectExplorer() {
|
||||
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
||||
dock->setObjectName("Project Explorer");
|
||||
addDockWidget(Qt::LeftDockWidgetArea, dock);
|
||||
resizeDocks({dock}, {(int) (width() * 0.25)}, Qt::Horizontal);
|
||||
resizeDocks({dock}, {static_cast<int>(width() * 0.25)}, Qt::Horizontal);
|
||||
|
||||
// setup tree view
|
||||
m_projectExplorer = new QTreeView(dock);
|
||||
|
Reference in New Issue
Block a user