WPILibC++
2025.1.1
Loading...
Searching...
No Matches
ProtoHelper.h
Go to the documentation of this file.
1
// Copyright (c) FIRST and other WPILib contributors.
2
// Open Source Software; you can modify and/or share it under the terms of
3
// the WPILib BSD license file in the root directory of this project.
4
5
#pragma once
6
7
#include <google/protobuf/message.h>
8
9
namespace
wpi
{
10
template
<
typename
T>
11
inline
T*
CreateMessage
(google::protobuf::Arena* arena) {
12
#if GOOGLE_PROTOBUF_VERSION < 4000000
13
return
google::protobuf::Arena::CreateMessage<T>(arena);
14
#else
15
return
google::protobuf::Arena::Create<T>(arena);
16
#endif
17
}
18
}
// namespace wpi
wpi
Foonathan namespace.
Definition
ntcore_cpp.h:26
wpi::CreateMessage
T * CreateMessage(google::protobuf::Arena *arena)
Definition
ProtoHelper.h:11
wpi
ProtoHelper.h
Generated on Thu Jan 2 2025 00:19:44 for WPILibC++ by
1.12.0