8000 Use explicit initialization in ctor for kind member. · dok-net/arduino-esp8266@2b4a08d · GitHub
[go: up one dir, main page]

Skip to content

Commit 2b4a08d

Browse files
committed
Use explicit initialization in ctor for kind member.
1 parent af76e5f commit 2b4a08d

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

cores/esp8266/Delegate.h

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ namespace detail
5858
public:
5959
DelegatePImpl()
6060
{
61+
kind = FP;
6162
fn = nullptr;
6263
}
6364

6465
DelegatePImpl(std::nullptr_t)
6566
{
67+
kind = FP;
6668
fn = nullptr;
6769
}
6870

@@ -367,7 +369,7 @@ namespace detail
367369
}
368370

369371
protected:
370-
enum { FUNC, FP, FPA } kind = FP;
372+
enum { FUNC, FP, FPA } kind;
371373
union {
372374
FunctionType functional;
373375
FunPtr fn;
@@ -389,11 +391,13 @@ namespace detail
389391
public:
390392
DelegatePImpl()
391393
{
394+
kind = FP;
392395
fn = nullptr;
393396
}
394397

395398
DelegatePImpl(std::nullptr_t)
396399
{
400+
kind = FP;
397401
fn = nullptr;
398402
}
399403

@@ -586,7 +590,7 @@ namespace detail
586590
}
587591

588592
protected:
589-
enum { FP, FPA } kind = FP;
593+
enum { FP, FPA } kind;
590594
union {
591595
FunPtr fn;
592596
FunAPtr fnA;
@@ -607,11 +611,13 @@ namespace detail
607611
public:
608612
DelegatePImpl()
609613
{
614+
kind = FP;
610615
fn = nullptr;
611616
}
612617

613618
DelegatePImpl(std::nullptr_t)
614619
{
620+
kind = FP;
615621
fn = nullptr;
616622
}
617623

@@ -819,7 +825,7 @@ namespace detail
819825
}
820826

821827
protected:
822-
enum { FUNC, FP } kind = FP;
828+
enum { FUNC, FP } kind;
823829
union {
824830
FunctionType functional;
825831
FunPtr fn;
@@ -934,11 +940,13 @@ namespace detail
934940
public:
935941
DelegateImpl()
936942
{
943+
kind = FP;
937944
fn = nullptr;
938945
}
939946

940947
DelegateImpl(std::nullptr_t)
941948
{
949+
kind = FP;
942950
fn = nullptr;
943951
}
944952

@@ -1242,7 +1250,7 @@ namespace detail
12421250
}
12431251

12441252
protected:
1245-
enum { FUNC, FP, FPA } kind = FP;
1253+
enum { FUNC, FP, FPA } kind;
12461254
union {
12471255
FunctionType functional;
12481256
FunPtr fn;
@@ -1264,11 +1272,13 @@ namespace detail
12641272
public:
12651273
DelegateImpl()
12661274
{
1275+
kind = FP;
12671276
fn = nullptr;
12681277
}
12691278

12701279
DelegateImpl(std::nullptr_t)
12711280
{
1281+
kind = FP;
12721282
fn = nullptr;
12731283
}
12741284

@@ -1460,7 +1470,7 @@ namespace detail
14601470
}
14611471

14621472
protected:
1463-
enum { FP, FPA } kind = FP;
1473+
enum { FP, FPA } kind;
14641474
union {
14651475
FunPtr fn;
14661476
FunAPtr fnA;
@@ -1481,11 +1491,13 @@ namespace detail
14811491
public:
14821492
DelegateImpl()
14831493
{
1494+
kind = FP;
14841495
fn = nullptr;
14851496
}
14861497

14871498
DelegateImpl(std::nullptr_t)
14881499
{
1500+
kind = FP;
14891501
fn = nullptr;
14901502
}
14911503

@@ -1693,7 +1705,7 @@ namespace detail
16931705
}
16941706

16951707
protected:
1696-
enum { FUNC, FP } kind = FP;
1708+
enum { FUNC, FP } kind;
16971709
union {
16981710
FunctionType functional;
16991711
FunPtr fn;

0 commit comments

Comments
 (0)
0