mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-16 07:22:16 -07:00
Move libcockatrice_server to libcockatrice_network/server/remote
Took 1 hour 41 minutes Took 39 seconds Took 4 minutes
This commit is contained in:
parent
eb7c4cae6c
commit
133c02f973
118 changed files with 218 additions and 338 deletions
|
|
@ -0,0 +1,14 @@
|
|||
#include "get_pb_extension.h"
|
||||
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/message.h>
|
||||
|
||||
int getPbExtension(const ::google::protobuf::Message &message)
|
||||
{
|
||||
std::vector<const ::google::protobuf::FieldDescriptor *> fieldList;
|
||||
message.GetReflection()->ListFields(message, &fieldList);
|
||||
for (unsigned int j = 0; j < fieldList.size(); ++j)
|
||||
if (fieldList[j]->is_extension())
|
||||
return fieldList[j]->number();
|
||||
return -1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue