File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,8 @@ using ScopeCollectionPair = std::pair<ScopeID, CollectionID>;
171171 */
172172class CollectionIDNetworkOrder {
173173public:
174- CollectionIDNetworkOrder (CollectionID v) : value(htonl(uint32_t (v))) {
174+ explicit CollectionIDNetworkOrder (CollectionID v)
175+ : value(htonl(uint32_t (v))) {
175176 }
176177
177178 CollectionID to_host () const {
@@ -184,7 +185,7 @@ class CollectionIDNetworkOrder {
184185
185186class ScopeIDNetworkOrder {
186187public:
187- ScopeIDNetworkOrder (ScopeID v) : value(htonl(uint32_t (v))) {
188+ explicit ScopeIDNetworkOrder (ScopeID v) : value(htonl(uint32_t (v))) {
188189 }
189190
190191 ScopeID to_host () const {
@@ -201,11 +202,11 @@ static_assert(sizeof(CollectionIDType) == 4,
201202static_assert (sizeof (ScopeIDType) == 4 , " ScopeIDType assumes 4-byte id" );
202203
203204inline CollectionIDNetworkOrder CollectionID::to_network () const {
204- return {*this };
205+ return CollectionIDNetworkOrder {*this };
205206}
206207
207208inline ScopeIDNetworkOrder ScopeID::to_network () const {
208- return {*this };
209+ return ScopeIDNetworkOrder {*this };
209210}
210211
211212namespace std {
You can’t perform that action at this time.
0 commit comments