From c4f8640f632c00703161686cd735a8a3461313ed Mon Sep 17 00:00:00 2001 From: wuye9036 Date: Tue, 14 Jun 2016 12:22:43 -0700 Subject: [PATCH] Fixed #19 --- ReadMe.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 9a5aded..14d0e7f 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -729,7 +729,7 @@ Variant addFloatOrMulInt(Variant const* a, Variant const* b) 更常见的是 `void*`: ``` C++ -#define BIN_OP(type, a, op, b, result) (*(type const *)(result)) = (*(type const *)(a)) op (*(type const*)(b)) +#define BIN_OP(type, a, op, b, result) (*(type *)(result)) = (*(type const *)(a)) op (*(type const*)(b)) void doDiv(void* out, void const* data0, void const* data1, DATA_TYPE type) { if(type == TYPE_INT) @@ -1030,9 +1030,9 @@ void PrintID() // TypeToID 的模板“原型” // ... -template class TypeToID +template <> class TypeToID { - static int const ID = 0xF10A7; + static int const ID = 0xF10A7; }; ``` @@ -1041,12 +1041,12 @@ template class TypeToID ``` C++ template <> class TypeToID { - static int const ID = 0x401d; + static int const ID = 0x401d; }; void PrintID() { - cout << "ID of uint8_t: " << TypeToID::ID << endl; + cout << "ID of uint8_t: " << TypeToID::ID << endl; } ```