From badebc6b653044a64a5f483c2b69ca4367fc34a3 Mon Sep 17 00:00:00 2001 From: jakcron Date: Fri, 24 Aug 2018 16:08:16 +0800 Subject: [PATCH] [nstool] Add more constructors to sOptional --- programs/nstool/source/nstool.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/nstool/source/nstool.h b/programs/nstool/source/nstool.h index 6bdf571..883ee44 100644 --- a/programs/nstool/source/nstool.h +++ b/programs/nstool/source/nstool.h @@ -48,6 +48,8 @@ struct sOptional bool isSet; T var; inline sOptional() : isSet(false) {} + inline sOptional(const T& other) : isSet(true), var(other) {} + inline sOptional(const sOptional& other) : isSet(other.isSet), var(other.var) {} inline const T& operator=(const T& other) { isSet = true; var = other; return var; } inline const sOptional& operator=(const sOptional& other) {