Skip to content

Commit a04fcb2

Browse files
committed
Make initializers explicit for maps and lists
1 parent 44c8090 commit a04fcb2

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

ipc/source/GGIpcModel.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ namespace Aws
418418
}
419419
if (jsonView.ValueExists("keyPath"))
420420
{
421-
configurationUpdateEvent.m_keyPath = {};
421+
configurationUpdateEvent.m_keyPath = Crt::Vector<Crt::String>();
422422
for (const Crt::JsonView &keyPathJsonView : jsonView.GetArray("keyPath"))
423423
{
424424
Crt::Optional<Crt::String> keyPathItem;
@@ -1514,6 +1514,7 @@ namespace Aws
15141514
}
15151515
if (jsonView.ValueExists("rootComponentVersionsToAdd"))
15161516
{
1517+
createLocalDeploymentRequest.m_rootComponentVersionsToAdd = Crt::Map<Crt::String, Crt::String>();
15171518
for (const auto &componentToVersionMapPair :
15181519
jsonView.GetJsonObject("rootComponentVersionsToAdd").GetAllObjects())
15191520
{
@@ -1526,7 +1527,7 @@ namespace Aws
15261527
}
15271528
if (jsonView.ValueExists("rootComponentsToRemove"))
15281529
{
1529-
createLocalDeploymentRequest.m_rootComponentsToRemove = {};
1530+
createLocalDeploymentRequest.m_rootComponentsToRemove = Crt::Vector<Crt::String>();
15301531
for (const Crt::JsonView &componentListJsonView : jsonView.GetArray("rootComponentsToRemove"))
15311532
{
15321533
Crt::Optional<Crt::String> componentListItem;
@@ -1537,6 +1538,7 @@ namespace Aws
15371538
}
15381539
if (jsonView.ValueExists("componentToConfiguration"))
15391540
{
1541+
createLocalDeploymentRequest.m_componentToConfiguration = Crt::Map<Crt::String, Crt::JsonObject>();
15401542
for (const auto &componentToConfigurationPair :
15411543
jsonView.GetJsonObject("componentToConfiguration").GetAllObjects())
15421544
{
@@ -1549,6 +1551,7 @@ namespace Aws
15491551
}
15501552
if (jsonView.ValueExists("componentToRunWithInfo"))
15511553
{
1554+
createLocalDeploymentRequest.m_componentToRunWithInfo = Crt::Map<Crt::String, RunWithInfo>();
15521555
for (const auto &componentToRunWithInfoPair :
15531556
jsonView.GetJsonObject("componentToRunWithInfo").GetAllObjects())
15541557
{
@@ -1823,7 +1826,7 @@ namespace Aws
18231826
{
18241827
if (jsonView.ValueExists("localDeployments"))
18251828
{
1826-
listLocalDeploymentsResponse.m_localDeployments = {};
1829+
listLocalDeploymentsResponse.m_localDeployments = Crt::Vector<LocalDeployment>();
18271830
for (const Crt::JsonView &listOfLocalDeploymentsJsonView : jsonView.GetArray("localDeployments"))
18281831
{
18291832
Crt::Optional<LocalDeployment> listOfLocalDeploymentsItem;
@@ -2007,7 +2010,7 @@ namespace Aws
20072010
{
20082011
if (jsonView.ValueExists("results"))
20092012
{
2010-
listNamedShadowsForThingResponse.m_results = {};
2013+
listNamedShadowsForThingResponse.m_results = Crt::Vector<Crt::String>();
20112014
for (const Crt::JsonView &namedShadowListJsonView : jsonView.GetArray("results"))
20122015
{
20132016
Crt::Optional<Crt::String> namedShadowListItem;
@@ -2268,7 +2271,7 @@ namespace Aws
22682271
}
22692272
if (jsonView.ValueExists("versionStage"))
22702273
{
2271-
getSecretValueResponse.m_versionStage = {};
2274+
getSecretValueResponse.m_versionStage = Crt::Vector<Crt::String>();
22722275
for (const Crt::JsonView &secretVersionListJsonView : jsonView.GetArray("versionStage"))
22732276
{
22742277
Crt::Optional<Crt::String> secretVersionListItem;
@@ -2866,7 +2869,7 @@ namespace Aws
28662869
{
28672870
if (jsonView.ValueExists("keyPath"))
28682871
{
2869-
updateConfigurationRequest.m_keyPath = {};
2872+
updateConfigurationRequest.m_keyPath = Crt::Vector<Crt::String>();
28702873
for (const Crt::JsonView &keyPathJsonView : jsonView.GetArray("keyPath"))
28712874
{
28722875
Crt::Optional<Crt::String> keyPathItem;
@@ -3394,7 +3397,7 @@ namespace Aws
33943397
{
33953398
if (jsonView.ValueExists("components"))
33963399
{
3397-
listComponentsResponse.m_components = {};
3400+
listComponentsResponse.m_components = Crt::Vector<ComponentDetails>();
33983401
for (const Crt::JsonView &listOfComponentsJsonView : jsonView.GetArray("components"))
33993402
{
34003403
Crt::Optional<ComponentDetails> listOfComponentsItem;
@@ -3815,7 +3818,7 @@ namespace Aws
38153818
}
38163819
if (jsonView.ValueExists("keyPath"))
38173820
{
3818-
getConfigurationRequest.m_keyPath = {};
3821+
getConfigurationRequest.m_keyPath = Crt::Vector<Crt::String>();
38193822
for (const Crt::JsonView &keyPathJsonView : jsonView.GetArray("keyPath"))
38203823
{
38213824
Crt::Optional<Crt::String> keyPathItem;
@@ -4240,7 +4243,7 @@ namespace Aws
42404243
}
42414244
if (jsonView.ValueExists("keyPath"))
42424245
{
4243-
subscribeToConfigurationUpdateRequest.m_keyPath = {};
4246+
subscribeToConfigurationUpdateRequest.m_keyPath = Crt::Vector<Crt::String>();
42444247
for (const Crt::JsonView &keyPathJsonView : jsonView.GetArray("keyPath"))
42454248
{
42464249
Crt::Optional<Crt::String> keyPathItem;

0 commit comments

Comments
 (0)