MCPcopy Create free account
hub / github.com/Kitware/CMake / CombineUnions

Method CombineUnions

Source/cmDependsJavaParserHelper.cxx:113–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void cmDependsJavaParserHelper::CombineUnions(char** out, char const* in1,
114 char** in2, char const* sep)
115{
116 size_t len = 1;
117 if (in1) {
118 len += strlen(in1);
119 }
120 if (*in2) {
121 len += strlen(*in2);
122 }
123 if (sep) {
124 len += strlen(sep);
125 }
126 *out = new char[len];
127 *out[0] = 0;
128 if (in1) {
129 strcat(*out, in1);
130 }
131 if (sep) {
132 strcat(*out, sep);
133 }
134 if (*in2) {
135 strcat(*out, *in2);
136 }
137 if (*in2) {
138 this->DeallocateParserType(in2);
139 }
140 this->UnionsAvailable++;
141}
142
143void cmDependsJavaParserHelper::CheckEmpty(
144 int line, int cnt, cmDependsJavaParserHelper::ParserType* pt)

Callers

nothing calls this directly

Calls 2

DeallocateParserTypeMethod · 0.95
strlenFunction · 0.50

Tested by

no test coverage detected