Browse Source

JSON-190: default-initialize "Out" variables explicitly.

JSON-192 Release_2.1.0
roker 7 months ago
parent
commit
090e9f1496
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      server/inout.hh

+ 3
- 1
server/inout.hh View File

@ -151,7 +151,9 @@ struct Out
typedef T* c_type; // the according type in C function parameter
enum { is_output = true, need_input = !(PF & ParamFlag::NoInput) }; // if need_input=false it would no longer consume an element in the input parameter array.
Out() = default;
Out()
: value{}
{}
// JSON-160: (t) is necessary on GCC and MSVC. {t} does not work here. Whyever...
explicit Out(const T& t) : value(t)


Loading…
Cancel
Save