Accessing translation data standardized

This commit is contained in:
2016-03-02 10:45:22 +01:00
parent c44b449a36
commit 4e5811803a
3 changed files with 24 additions and 20 deletions

View File

@@ -45,16 +45,6 @@ namespace ZRCola {
unsigned __int32 start; ///< Composed character offset
unsigned __int32 end; ///< Decomposed string end offset
///
/// Returns translation string start offset
///
inline unsigned __int32 GetChrStart() const { return start; }
///
/// Returns translation string start offset
///
inline unsigned __int32 GetStrStart() const { return start + 1; }
///
/// Returns translation string length
///
@@ -62,9 +52,23 @@ namespace ZRCola {
};
#pragma pack(pop)
#pragma pack(push)
#pragma pack(2)
#pragma warning(push)
#pragma warning(disable: 4200)
///
/// Translation data
///
struct translation {
wchar_t chr; ///< Composed character
wchar_t str[]; ///< Decomposed string
};
#pragma warning(pop)
#pragma pack(pop)
std::vector<index> idxComp; ///< Composition index
std::vector<index> idxDecomp; ///< Decomposition index
std::vector<wchar_t> data; ///< Transformation data
std::vector<wchar_t> data; ///< Transformation data
public:
///