File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
include/jsoncons_ext/ubjson Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,17 @@ class basic_ubjson_encoder final : public basic_json_visitor<char>
100100 nesting_depth_(0 )
101101 {
102102 }
103-
104- ~basic_ubjson_encoder () = default ;
103+
104+ ~basic_ubjson_encoder () noexcept
105+ {
106+ JSONCONS_TRY
107+ {
108+ sink_.flush ();
109+ }
110+ JSONCONS_CATCH (...)
111+ {
112+ }
113+ }
105114
106115 basic_ubjson_encoder& operator =(const basic_ubjson_encoder&) = delete ;
107116 basic_ubjson_encoder& operator =(basic_ubjson_encoder&&) = delete ;
@@ -118,17 +127,6 @@ class basic_ubjson_encoder final : public basic_json_visitor<char>
118127 reset ();
119128 }
120129
121- ~basic_ubjson_encoder () noexcept
122- {
123- JSONCONS_TRY
124- {
125- sink_.flush ();
126- }
127- JSONCONS_CATCH (...)
128- {
129- }
130- }
131-
132130private:
133131 // Implementing methods
134132
You can’t perform that action at this time.
0 commit comments