Skip to content

Commit 818e0c3

Browse files
committed
🛠 fix includes
1 parent ccdb674 commit 818e0c3

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

source/ztd/cuneicode/io.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333

3434
#include <ztd/cuneicode/mcstate.h>
3535

36+
#include <cstdio>
37+
#include <cerrno>
38+
3639
ZTD_USE(ZTD_C_LANGUAGE_LINKAGE)
3740
ZTD_USE(ZTD_CUNEICODE_API_LINKAGE)
3841
size_t cnc_fprint_str_mcn(FILE* __file, size_t __str_n, const char* __str)

source/ztd/cuneicode/mcn.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,12 @@ cnc_mcerr cnc_mcnrtoc16n(size_t* __p_maybe_dst_len, ztd_char16_t** __p_maybe_dst
131131
reinterpret_cast<const ztd_char8_t**>(__p_src), __p_state);
132132
}
133133
}
134-
else {
135-
cnc_mcstate_t __substitute_state {};
136-
if (__p_state == nullptr)
137-
__p_state = &__substitute_state;
138-
_ZTDC_CUNEICODE_TRANSCODE_ONE_BODY(__p_maybe_dst_len, __p_maybe_dst, __p_src_len,
139-
__p_src, __p_state, decltype(&cnc_mcnrtoc32n), &cnc_mcnrtoc32n,
140-
decltype(&cnc_c32nrtoc16n), &cnc_c32nrtoc16n);
141-
}
134+
cnc_mcstate_t __substitute_state {};
135+
if (__p_state == nullptr)
136+
__p_state = &__substitute_state;
137+
_ZTDC_CUNEICODE_TRANSCODE_ONE_BODY(__p_maybe_dst_len, __p_maybe_dst, __p_src_len, __p_src,
138+
__p_state, decltype(&cnc_mcnrtoc32n), &cnc_mcnrtoc32n, decltype(&cnc_c32nrtoc16n),
139+
&cnc_c32nrtoc16n);
142140
}
143141
}
144142

0 commit comments

Comments
 (0)