Browse Source

Use PRId64 for portability of printf format strings on Linux and Windows.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
b9594bb07b
2 changed files with 5 additions and 4 deletions
  1. +1
    -0
      include/common.hpp
  2. +4
    -4
      src/app/RackWidget.cpp

+ 1
- 0
include/common.hpp View File

@@ -4,6 +4,7 @@
#include <cstdlib>
#include <cstdio>
#include <cstdint>
#include <cinttypes>
#include <cstdarg>
#include <climits>
#include <cmath>


+ 4
- 4
src/app/RackWidget.cpp View File

@@ -187,7 +187,7 @@ void RackWidget::mergeJson(json_t* rootJ) {
// TODO Legacy v0.6?
ModuleWidget* moduleWidget = getModule(id);
if (!moduleWidget) {
WARN("Cannot find ModuleWidget with ID %lld", id);
WARN("Cannot find ModuleWidget with ID %" PRId64 "", id);
continue;
}

@@ -212,7 +212,7 @@ void RackWidget::mergeJson(json_t* rootJ) {
int64_t id = json_integer_value(idJ);
CableWidget* cw = getCable(id);
if (!cw) {
WARN("Cannot find CableWidget with ID %lld", id);
WARN("Cannot find CableWidget with ID %" PRId64 "", id);
continue;
}

@@ -238,7 +238,7 @@ void RackWidget::fromJson(json_t* rootJ) {
int64_t id = json_integer_value(idJ);
engine::Module* module = APP->engine->getModule(id);
if (!module) {
WARN("Cannot find module with ID %lld", id);
WARN("Cannot find module with ID %" PRId64 "", id);
continue;
}

@@ -283,7 +283,7 @@ void RackWidget::fromJson(json_t* rootJ) {
int64_t id = json_integer_value(idJ);
engine::Cable* cable = APP->engine->getCable(id);
if (!cable) {
WARN("Cannot find cable with ID %lld", id);
WARN("Cannot find cable with ID %" PRId64 "", id);
continue;
}



Loading…
Cancel
Save