From f3c0e83d042a2914878baab95279985e2568a317 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 2 Mar 2016 12:29:41 +0100 Subject: [PATCH] Database element is generic 16-bit unsigned integer now --- lib/libZRCola/include/zrcola/translate.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/libZRCola/include/zrcola/translate.h b/lib/libZRCola/include/zrcola/translate.h index b704766..fd4d956 100644 --- a/lib/libZRCola/include/zrcola/translate.h +++ b/lib/libZRCola/include/zrcola/translate.h @@ -53,7 +53,7 @@ namespace ZRCola { std::vector idxComp; ///< Composition index std::vector idxDecomp; ///< Decomposition index - std::vector data; ///< Transformation data + std::vector data; ///< Transformation data public: /// @@ -89,11 +89,11 @@ const ZRCola::recordid_t stdex::idrec::record>(_In_ std::istream& stream, _Out_ ZRCola::translation_db &t_db) +inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::translation_db &db) { unsigned __int32 count; @@ -102,13 +102,13 @@ inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::transl if (!stream.good()) return stream; // Read composition index. - t_db.idxComp.resize(count); - stream.read((char*)t_db.idxComp.data(), sizeof(unsigned __int32)*count); + db.idxComp.resize(count); + stream.read((char*)db.idxComp.data(), sizeof(unsigned __int32)*count); if (!stream.good()) return stream; // Read decomposition index. - t_db.idxDecomp.resize(count); - stream.read((char*)t_db.idxDecomp.data(), sizeof(unsigned __int32)*count); + db.idxDecomp.resize(count); + stream.read((char*)db.idxDecomp.data(), sizeof(unsigned __int32)*count); if (!stream.good()) return stream; // Read data count. @@ -116,8 +116,8 @@ inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::transl if (!stream.good()) return stream; // Read data. - t_db.data.resize(count); - stream.read((char*)t_db.data.data(), sizeof(wchar_t)*count); + db.data.resize(count); + stream.read((char*)db.data.data(), sizeof(unsigned __int16)*count); return stream; }