@@ -620,28 +620,28 @@ struct AutoUTF {
620
620
#define RAPIDJSON_ENCODINGS_FUNC (x ) UTF8<Ch>::x, UTF16LE<Ch>::x, UTF16BE<Ch>::x, UTF32LE<Ch>::x, UTF32BE<Ch>::x
621
621
622
622
template <typename OutputStream>
623
- RAPIDJSON_FORCEINLINE static void Encode (OutputStream& os, unsigned codepoint) {
623
+ static RAPIDJSON_FORCEINLINE void Encode (OutputStream& os, unsigned codepoint) {
624
624
typedef void (*EncodeFunc)(OutputStream&, unsigned );
625
625
static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC (Encode) };
626
626
(*f[os.GetType ()])(os, codepoint);
627
627
}
628
628
629
629
template <typename OutputStream>
630
- RAPIDJSON_FORCEINLINE static void EncodeUnsafe (OutputStream& os, unsigned codepoint) {
630
+ static RAPIDJSON_FORCEINLINE void EncodeUnsafe (OutputStream& os, unsigned codepoint) {
631
631
typedef void (*EncodeFunc)(OutputStream&, unsigned );
632
632
static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC (EncodeUnsafe) };
633
633
(*f[os.GetType ()])(os, codepoint);
634
634
}
635
635
636
636
template <typename InputStream>
637
- RAPIDJSON_FORCEINLINE static bool Decode (InputStream& is, unsigned * codepoint) {
637
+ static RAPIDJSON_FORCEINLINE bool Decode (InputStream& is, unsigned * codepoint) {
638
638
typedef bool (*DecodeFunc)(InputStream&, unsigned *);
639
639
static const DecodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC (Decode) };
640
640
return (*f[is.GetType ()])(is, codepoint);
641
641
}
642
642
643
643
template <typename InputStream, typename OutputStream>
644
- RAPIDJSON_FORCEINLINE static bool Validate (InputStream& is, OutputStream& os) {
644
+ static RAPIDJSON_FORCEINLINE bool Validate (InputStream& is, OutputStream& os) {
645
645
typedef bool (*ValidateFunc)(InputStream&, OutputStream&);
646
646
static const ValidateFunc f[] = { RAPIDJSON_ENCODINGS_FUNC (Validate) };
647
647
return (*f[is.GetType ()])(is, os);
@@ -658,7 +658,7 @@ template<typename SourceEncoding, typename TargetEncoding>
658
658
struct Transcoder {
659
659
// ! Take one Unicode codepoint from source encoding, convert it to target encoding and put it to the output stream.
660
660
template <typename InputStream, typename OutputStream>
661
- RAPIDJSON_FORCEINLINE static bool Transcode (InputStream& is, OutputStream& os) {
661
+ static RAPIDJSON_FORCEINLINE bool Transcode (InputStream& is, OutputStream& os) {
662
662
unsigned codepoint;
663
663
if (!SourceEncoding::Decode (is, &codepoint))
664
664
return false ;
@@ -667,7 +667,7 @@ struct Transcoder {
667
667
}
668
668
669
669
template <typename InputStream, typename OutputStream>
670
- RAPIDJSON_FORCEINLINE static bool TranscodeUnsafe (InputStream& is, OutputStream& os) {
670
+ static RAPIDJSON_FORCEINLINE bool TranscodeUnsafe (InputStream& is, OutputStream& os) {
671
671
unsigned codepoint;
672
672
if (!SourceEncoding::Decode (is, &codepoint))
673
673
return false ;
@@ -677,7 +677,7 @@ struct Transcoder {
677
677
678
678
// ! Validate one Unicode codepoint from an encoded stream.
679
679
template <typename InputStream, typename OutputStream>
680
- RAPIDJSON_FORCEINLINE static bool Validate (InputStream& is, OutputStream& os) {
680
+ static RAPIDJSON_FORCEINLINE bool Validate (InputStream& is, OutputStream& os) {
681
681
return Transcode (is, os); // Since source/target encoding is different, must transcode.
682
682
}
683
683
};
@@ -690,19 +690,19 @@ inline void PutUnsafe(Stream& stream, typename Stream::Ch c);
690
690
template <typename Encoding>
691
691
struct Transcoder <Encoding, Encoding> {
692
692
template <typename InputStream, typename OutputStream>
693
- RAPIDJSON_FORCEINLINE static bool Transcode (InputStream& is, OutputStream& os) {
693
+ static RAPIDJSON_FORCEINLINE bool Transcode (InputStream& is, OutputStream& os) {
694
694
os.Put (is.Take ()); // Just copy one code unit. This semantic is different from primary template class.
695
695
return true ;
696
696
}
697
697
698
698
template <typename InputStream, typename OutputStream>
699
- RAPIDJSON_FORCEINLINE static bool TranscodeUnsafe (InputStream& is, OutputStream& os) {
699
+ static RAPIDJSON_FORCEINLINE bool TranscodeUnsafe (InputStream& is, OutputStream& os) {
700
700
PutUnsafe (os, is.Take ()); // Just copy one code unit. This semantic is different from primary template class.
701
701
return true ;
702
702
}
703
703
704
704
template <typename InputStream, typename OutputStream>
705
- RAPIDJSON_FORCEINLINE static bool Validate (InputStream& is, OutputStream& os) {
705
+ static RAPIDJSON_FORCEINLINE bool Validate (InputStream& is, OutputStream& os) {
706
706
return Encoding::Validate (is, os); // source/target encoding are the same
707
707
}
708
708
};
0 commit comments