Skip to content

Commit 8c32fe3

Browse files
authored
Merge branch 'main' into user/asayem/1ds_reachability
2 parents db0b8f6 + 715e5f9 commit 8c32fe3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

lib/decoder/PayloadDecoder.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ namespace clienttelemetry {
130130
return true;
131131
}
132132

133+
#ifdef _MSC_VER
134+
#pragma warning(push)
135+
#pragma warning(disable : 4866)
136+
// In C++17 left-to-right evaluation order for operands of operator[] is not guaranteed when the argument's copy constructor is run.
137+
// Evalutation order isn't not relied upon here, disabling warning.
138+
#endif // _MSC_VER
133139
void to_json(json& j, const Data& d)
134140
{
135141
for (const auto &kv : d.properties)
@@ -230,6 +236,9 @@ namespace clienttelemetry {
230236
}
231237
}
232238
}
239+
#ifdef _MSC_VER
240+
#pragma warning( pop )
241+
#endif // _MSC_VER
233242

234243
void to_json(json& j, const Record& r)
235244
{

lib/system/JsonFormatter.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ namespace MAT_NS_BEGIN
4040
}
4141
}
4242

43+
#ifdef _MSC_VER
44+
#pragma warning( push )
45+
#pragma warning( disable : 4866 )
46+
// In C++17 left-to-right evaluation order for operands of operator[] is not guaranteed when the argument's copy constructor is run.
47+
// Evalutation order isn't not relied upon here, disabling warning.
48+
#endif // _MSC_VER
4349
void addData(json& object, std::vector<::CsProtocol::Data>& data)
4450
{
4551
std::vector<::CsProtocol::Data>::const_iterator it;
@@ -126,6 +132,9 @@ namespace MAT_NS_BEGIN
126132
}
127133
}
128134
}
135+
#ifdef _MSC_VER
136+
#pragma warning( pop )
137+
#endif // _MSC_VER
129138

130139
std::string JsonFormatter::getJsonFormattedEvent(IncomingEventContextPtr const& event)
131140
{

0 commit comments

Comments
 (0)