MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / setStrPointers

Method setStrPointers

src/common/StatusArg.cpp:176–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void StatusVector::ImplStatusVector::setStrPointers(const char* oldBase)
177{
178 const char* const newBase = m_strings.c_str();
179 if (newBase == oldBase)
180 return;
181
182 const char* const newEnd = m_strings.end();
183
184 for (ISC_STATUS* arg = m_status_vector.begin(); *arg != isc_arg_end; arg += fb_utils::nextArg(*arg))
185 {
186 if (!fb_utils::isStr(*arg))
187 continue;
188
189 const char** ptr = reinterpret_cast<const char**>(&arg[fb_utils::nextArg(*arg) - 1]);
190 if (*ptr >= newBase && *ptr < newEnd)
191 break;
192
193 *ptr = &newBase[*ptr - oldBase];
194 }
195}
196
197void StatusVector::ImplStatusVector::append(const StatusVector& v) throw()
198{

Callers

nothing calls this directly

Calls 5

nextArgFunction · 0.85
isStrFunction · 0.85
c_strMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected