This commit is contained in:
Jonathan Campbell
2019-03-18 21:57:13 -07:00
parent 04ff3d68a6
commit 7dbbbfca60

View File

@@ -33,9 +33,11 @@ public:
return "?"; return "?";
} }
protected: inline size_t get_src_last_read(void) const { /* in units of sizeof(srcT) */
static constexpr bool big_endian(void) { return src_adv;
return (BYTE_ORDER == BIG_ENDIAN); }
inline size_t get_dest_last_written(void) const { /* in units of sizeof(dstT) */
return dst_adv;
} }
public: public:
size_t dst_adv = 0; size_t dst_adv = 0;
@@ -54,6 +56,9 @@ protected:
return NULL; return NULL;
} }
static constexpr bool big_endian(void) {
return (BYTE_ORDER == BIG_ENDIAN);
}
}; };
template <typename srcT,typename dstT> class _Iconv : public _Iconv_CommonBase { template <typename srcT,typename dstT> class _Iconv : public _Iconv_CommonBase {
@@ -202,12 +207,6 @@ public:
inline const dstT *get_destp(void) const { inline const dstT *get_destp(void) const {
return dst_ptr; return dst_ptr;
} }
inline size_t get_src_last_read(void) const { /* in units of sizeof(srcT) */
return src_adv;
}
inline size_t get_dest_last_written(void) const { /* in units of sizeof(dstT) */
return dst_adv;
}
public: public:
static _Iconv<srcT,dstT> *create(const char *nw) { /* factory function, wide to char, or char to wide */ static _Iconv<srcT,dstT> *create(const char *nw) { /* factory function, wide to char, or char to wide */
if (sizeof(dstT) == sizeof(char) && sizeof(srcT) == sizeof(wchar_t)) { if (sizeof(dstT) == sizeof(char) && sizeof(srcT) == sizeof(wchar_t)) {