From 1fae63de23320a1663b7c591e247ad81852ab6dc Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 22 Nov 2020 13:00:06 +0100 Subject: Support 16-bit short --- flowgraph/node.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'flowgraph/node.cpp') diff --git a/flowgraph/node.cpp b/flowgraph/node.cpp index 8e8b5eb..d7ed939 100644 --- a/flowgraph/node.cpp +++ b/flowgraph/node.cpp @@ -1,10 +1,9 @@ #include "node.h" +#include "byteorder.h" #include "data.h" #include "minicc.h" -#include - #include using namespace FlowGraph; @@ -20,7 +19,7 @@ FlowGraph::Data& Node::destination() // 4 byte for now Data FlowGraph::MakeConstantInt(int i) { - return Data{DataType::Int, std::make_shared(to_little_endian(int32_t(i)))}; + return Data{DataType::Int, std::make_shared(endian::to_little(uint32_t(i)))}; } Data FlowGraph::MakeLocalPointer(std::shared_ptr scope, const std::string& name) -- cgit v1.2.3