diff options
| author | Roland Reichwein <mail@reichwein.it> | 2020-11-22 13:00:06 +0100 | 
|---|---|---|
| committer | Roland Reichwein <mail@reichwein.it> | 2020-11-22 13:00:06 +0100 | 
| commit | 1fae63de23320a1663b7c591e247ad81852ab6dc (patch) | |
| tree | bfe539b7eeb5a4d7b68aa1bf853898d60e34f784 /flowgraph | |
| parent | 739297d8895b08a9ecd8e81b01b7ba8e8dc4a8ae (diff) | |
Support 16-bit short
Diffstat (limited to 'flowgraph')
| -rw-r--r-- | flowgraph/data.h | 2 | ||||
| -rw-r--r-- | flowgraph/node.cpp | 5 | 
2 files changed, 4 insertions, 3 deletions
| diff --git a/flowgraph/data.h b/flowgraph/data.h index a52627d..2b92b2e 100644 --- a/flowgraph/data.h +++ b/flowgraph/data.h @@ -18,6 +18,8 @@ namespace FlowGraph {    Bool,    Char,    UChar, +  Short, +  UShort   };   class Storage; ///< forward declaration 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 <boost/endian/conversion.hpp> -  #include <memory>  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<Constant>(to_little_endian(int32_t(i)))}; + return Data{DataType::Int, std::make_shared<Constant>(endian::to_little(uint32_t(i)))};  }  Data FlowGraph::MakeLocalPointer(std::shared_ptr<FlowGraph::LocalScope> scope, const std::string& name) | 
