From 3e925e80a3bbbf654e00695b6fdcfabd2bea17a0 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 8 Sep 2016 07:41:44 -0400 Subject: [PATCH] Added a field-filling constructor for pulses. --- Storage/Tape/Tape.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Storage/Tape/Tape.hpp b/Storage/Tape/Tape.hpp index 2293f462d..e7c4749a0 100644 --- a/Storage/Tape/Tape.hpp +++ b/Storage/Tape/Tape.hpp @@ -29,10 +29,13 @@ namespace Tape { class Tape { public: struct Pulse { - enum { + enum Type { High, Low, Zero } type; Time length; + + Pulse(Type type, Time length) : type(type), length(length) {} + Pulse() {} }; virtual Pulse get_next_pulse() = 0;