This seems to have broken all the way back in
f47bc86.
T *get() const { return data; }
T &operator*() const { return *data; }
T *operator->() const { return data; }
- operator bool() const { return data!=0; }
+ explicit operator bool() const { return data!=0; }
unsigned refcount() const { return (data ? counts->count : 0); }
void JisX0208::Encoder::encode_char(unichar ucs, string &buf)
{
- unsigned short jis = ucs_to_jisx0208(ucs);
+ Kuten jis = ucs_to_jisx0208(ucs);
if(jis)
{
char jbuf[2];
- jbuf[0] = jis>>8;
- jbuf[1] = jis;
+ jbuf[0] = jis.ku+0x20;
+ jbuf[1] = jis.ten+0x20;
buf.append(jbuf, 2);
}
else
Kuten result;
if(ucs_to_jisx0208_table[i].ucs==static_cast<unsigned short>(c))
{
- result.ku = (ucs_to_jisx0208_table[i].jis>>8)+1;
- result.ten = ucs_to_jisx0208_table[i].jis+1;
+ result.ku = (ucs_to_jisx0208_table[i].jis>>8);
+ result.ten = ucs_to_jisx0208_table[i].jis;
}
return result;