@@ -47,9 +47,9 @@ bool PairsUtil::marshalPairs(const Pairs &pairs, char *buffer, size_t size) {
47
47
48
48
// Write number of pairs.
49
49
uint32_t num_pairs =
50
- htowasm (pairs.size (), contextOrEffectiveContext () = = nullptr
51
- ? false
52
- : contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder () );
50
+ htowasm (pairs.size (), contextOrEffectiveContext () ! = nullptr
51
+ ? contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder ()
52
+ : false );
53
53
if (pos + sizeof (uint32_t ) > end) {
54
54
return false ;
55
55
}
@@ -59,9 +59,9 @@ bool PairsUtil::marshalPairs(const Pairs &pairs, char *buffer, size_t size) {
59
59
for (const auto &p : pairs) {
60
60
// Write name length.
61
61
uint32_t name_len =
62
- htowasm (p.first .size (), contextOrEffectiveContext () = = nullptr
63
- ? false
64
- : contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder () );
62
+ htowasm (p.first .size (), contextOrEffectiveContext () ! = nullptr
63
+ ? contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder ()
64
+ : false );
65
65
if (pos + sizeof (uint32_t ) > end) {
66
66
return false ;
67
67
}
@@ -70,9 +70,9 @@ bool PairsUtil::marshalPairs(const Pairs &pairs, char *buffer, size_t size) {
70
70
71
71
// Write value length.
72
72
uint32_t value_len =
73
- htowasm (p.second .size (), contextOrEffectiveContext () = = nullptr
74
- ? false
75
- : contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder () );
73
+ htowasm (p.second .size (), contextOrEffectiveContext () ! = nullptr
74
+ ? contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder ()
75
+ : false );
76
76
if (pos + sizeof (uint32_t ) > end) {
77
77
return false ;
78
78
}
@@ -114,9 +114,9 @@ Pairs PairsUtil::toPairs(std::string_view buffer) {
114
114
return {};
115
115
}
116
116
uint32_t num_pairs = wasmtoh (*reinterpret_cast <const uint32_t *>(pos),
117
- contextOrEffectiveContext () = = nullptr
118
- ? false
119
- : contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder () );
117
+ contextOrEffectiveContext () ! = nullptr
118
+ ? contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder ()
119
+ : false );
120
120
pos += sizeof (uint32_t );
121
121
122
122
// Check if we're not going to exceed the limit.
@@ -136,19 +136,19 @@ Pairs PairsUtil::toPairs(std::string_view buffer) {
136
136
return {};
137
137
}
138
138
s.first = wasmtoh (*reinterpret_cast <const uint32_t *>(pos),
139
- contextOrEffectiveContext () = = nullptr
140
- ? false
141
- : contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder () );
139
+ contextOrEffectiveContext () ! = nullptr
140
+ ? contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder ()
141
+ : false );
142
142
pos += sizeof (uint32_t );
143
143
144
144
// Read value length.
145
145
if (pos + sizeof (uint32_t ) > end) {
146
146
return {};
147
147
}
148
148
s.second = wasmtoh (*reinterpret_cast <const uint32_t *>(pos),
149
- contextOrEffectiveContext () = = nullptr
150
- ? false
151
- : contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder () );
149
+ contextOrEffectiveContext () ! = nullptr
150
+ ? contextOrEffectiveContext ()-> wasmVm ()-> usesWasmByteOrder ()
151
+ : false );
152
152
pos += sizeof (uint32_t );
153
153
}
154
154
0 commit comments