@@ -75,7 +75,7 @@ static bool GetAnnotationInt32(const Reader& reader, uint64_t id, int32_t* resul
75
75
return false ;
76
76
}
77
77
78
- void ForEachMethod (const capnp::InterfaceSchema& interface, const std::function<void (const capnp::InterfaceSchema& interface, const capnp::InterfaceSchema::Method)>& callback)
78
+ static void ForEachMethod (const capnp::InterfaceSchema& interface, const std::function<void (const capnp::InterfaceSchema& interface, const capnp::InterfaceSchema::Method)>& callback)
79
79
{
80
80
for (const auto super : interface.getSuperclasses ()) {
81
81
ForEachMethod (super, callback);
@@ -89,7 +89,7 @@ using CharSlice = kj::ArrayPtr<const char>;
89
89
90
90
// Overload for any type with a string .begin(), like kj::StringPtr and kj::ArrayPtr<char>.
91
91
template <class OutputStream , class Array , const char * Enable = decltype (std::declval<Array>().begin())()>
92
- OutputStream& operator <<(OutputStream& os, const Array& array)
92
+ static OutputStream& operator <<(OutputStream& os, const Array& array)
93
93
{
94
94
os.write (array.begin (), array.size ());
95
95
return os;
@@ -107,14 +107,14 @@ struct Format
107
107
std::ostringstream m_os;
108
108
};
109
109
110
- std::string Cap (kj::StringPtr str)
110
+ static std::string Cap (kj::StringPtr str)
111
111
{
112
112
std::string result = str;
113
113
if (!result.empty () && ' a' <= result[0 ] && result[0 ] <= ' z' ) result[0 ] -= ' a' - ' A' ;
114
114
return result;
115
115
}
116
116
117
- bool BoxedType (const ::capnp::Type& type)
117
+ static bool BoxedType (const ::capnp::Type& type)
118
118
{
119
119
return !(type.isVoid () || type.isBool () || type.isInt8 () || type.isInt16 () || type.isInt32 () || type.isInt64 () ||
120
120
type.isUInt8 () || type.isUInt16 () || type.isUInt32 () || type.isUInt64 () || type.isFloat32 () ||
@@ -134,7 +134,7 @@ bool BoxedType(const ::capnp::Type& type)
134
134
// include_prefix is "/a/b/c" include lines like
135
135
// "#include <d/file.capnp.proxy.h>" "#include <d/file.capnp.proxy-types.h>"i
136
136
// will be generated.
137
- void Generate (kj::StringPtr src_prefix,
137
+ static void Generate (kj::StringPtr src_prefix,
138
138
kj::StringPtr include_prefix,
139
139
kj::StringPtr src_file,
140
140
const std::vector<kj::StringPtr>& import_paths,
0 commit comments