game2006/server/gameserver/typeconvert.cc
2020-10-28 11:50:16 +08:00

20 lines
321 B
C++

#include "precompile.h"
#include "cs_proto.pb.h"
namespace TypeConvert
{
void ToPb(const a8::Vec2& v, cs::MFVec2* pb_obj)
{
pb_obj->set_x(v.x);
pb_obj->set_y(v.y);
}
void FromPb(a8::Vec2& v, const cs::MFVec2* pb_obj)
{
v.x = pb_obj->x();
v.y = pb_obj->y();
}
}