word_t shim parameter

This commit is contained in:
Dr. Chat 2015-09-25 18:38:33 -05:00
parent f5ee6f4cf5
commit b12480820c
1 changed files with 4 additions and 0 deletions

View File

@ -297,6 +297,7 @@ class Result {
} // namespace shim } // namespace shim
using int_t = const shim::ParamBase<int32_t>&; using int_t = const shim::ParamBase<int32_t>&;
using word_t = const shim::ParamBase<uint16_t>&;
using dword_t = const shim::ParamBase<uint32_t>&; using dword_t = const shim::ParamBase<uint32_t>&;
using qword_t = const shim::ParamBase<uint64_t>&; using qword_t = const shim::ParamBase<uint64_t>&;
using float_t = const shim::ParamBase<float>&; using float_t = const shim::ParamBase<float>&;
@ -322,6 +323,9 @@ namespace shim {
inline void AppendParam(StringBuffer* string_buffer, int_t param) { inline void AppendParam(StringBuffer* string_buffer, int_t param) {
string_buffer->AppendFormat("%d", int32_t(param)); string_buffer->AppendFormat("%d", int32_t(param));
} }
inline void AppendParam(StringBuffer* string_buffer, word_t param) {
string_buffer->AppendFormat("%.4X", uint16_t(param));
}
inline void AppendParam(StringBuffer* string_buffer, dword_t param) { inline void AppendParam(StringBuffer* string_buffer, dword_t param) {
string_buffer->AppendFormat("%.8X", uint32_t(param)); string_buffer->AppendFormat("%.8X", uint32_t(param));
} }