diff options
Diffstat (limited to 'flowgraph/storage.h')
-rw-r--r-- | flowgraph/storage.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/flowgraph/storage.h b/flowgraph/storage.h index c2fa7c5..efd7d52 100644 --- a/flowgraph/storage.h +++ b/flowgraph/storage.h @@ -1,3 +1,4 @@ +// Different kinds of abstract storage locations: Constants, Global and Local Storage, Temporaries, ... #pragma once #include "data.h" @@ -15,13 +16,13 @@ namespace FlowGraph { class Storage { public: - virtual ~Storage() {} // force class to be polymorphic + virtual ~Storage() {} // force class to be polymorphic, for smart pointers }; class Constant: public Storage { public: - Constant(std::vector<uint8_t> value) {} // little endian data + Constant(std::vector<uint8_t>& value): m_value(value) {} // little endian data const std::vector<uint8_t>& value() const { return m_value; } private: std::vector<uint8_t> m_value; |