diff --git a/include/dap/typeof.h b/include/dap/typeof.h index 1ed0dc7..803bb8d 100644 --- a/include/dap/typeof.h +++ b/include/dap/typeof.h @@ -161,11 +161,11 @@ M member_type(M T::*); // DAP_IMPLEMENT_STRUCT_TYPEINFO_EXT(). // You probably do not want to use this directly. #define DAP_IMPLEMENT_STRUCT_FIELD_SERIALIZATION(STRUCT, NAME, ...) \ - bool TypeOf::deserializeFields(const Deserializer* d, void* obj) { \ + bool TypeOf::deserializeFields(const Deserializer* fd, void* obj) { \ using StructTy = STRUCT; \ (void)sizeof(StructTy); /* avoid unused 'using' warning */ \ for (auto field : std::initializer_list{__VA_ARGS__}) { \ - if (!d->field(field.name, [&](Deserializer* d) { \ + if (!fd->field(field.name, [&](Deserializer* d) { \ auto ptr = reinterpret_cast(obj) + field.offset; \ return field.type->deserialize(d, ptr); \ })) { \ @@ -174,11 +174,11 @@ M member_type(M T::*); } \ return true; \ } \ - bool TypeOf::serializeFields(FieldSerializer* s, const void* obj) { \ + bool TypeOf::serializeFields(FieldSerializer* fs, const void* obj) {\ using StructTy = STRUCT; \ (void)sizeof(StructTy); /* avoid unused 'using' warning */ \ for (auto field : std::initializer_list{__VA_ARGS__}) { \ - if (!s->field(field.name, [&](Serializer* s) { \ + if (!fs->field(field.name, [&](Serializer* s) { \ auto ptr = reinterpret_cast(obj) + field.offset; \ return field.type->serialize(s, ptr); \ })) { \ diff --git a/src/io.cpp b/src/io.cpp index 3ee972e..b4133e5 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -21,6 +21,7 @@ #include // strlen #include #include +#include namespace {