Skip to content

Commit a3e983b

Browse files
Initialize signal array with size 20 even when constructing it from a single signal.
1 parent ac91bdf commit a3e983b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/dynamic-graph/signal-array.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# include <dynamic-graph/signal-base.h>
2121
# include <dynamic-graph/dynamic-graph-api.h>
2222
# include <vector>
23+
#include <stdio.h>
2324

2425
namespace dynamicgraph
2526
{
@@ -135,15 +136,15 @@ namespace dynamicgraph
135136

136137
SignalArray<Time> (SignalBase<Time>& sig)
137138
: SignalArray_const<Time> (0),
138-
array(1)
139+
array(DEFAULT_SIZE)
139140
{
140-
size=1;
141+
size=DEFAULT_SIZE;
141142
addElmt(&sig);
142143
}
143144

144145
SignalArray<Time> (const SignalArray<Time>& siga)
145146
: SignalArray_const<Time> (siga.getSize()),
146-
array ()
147+
array (siga.getSize())
147148
{
148149
rank = siga.getSize ();
149150
for (unsigned int i = 0; i < rank; ++i)

0 commit comments

Comments
 (0)