MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / operator=

Method operator=

src/OpenFOAM/memory/tmp/tmpI.H:334–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332
333template<class T>
334inline void Foam::tmp<T>::operator=(T* tPtr)
335{
336 clear();
337
338 if (!tPtr)
339 {
340 FatalErrorInFunction
341 << "Attempted copy of a deallocated " << typeName()
342 << abort(FatalError);
343 }
344
345 if (tPtr && !tPtr->unique())
346 {
347 FatalErrorInFunction
348 << "Attempted assignment of a " << typeName()
349 << " to non-unique pointer"
350 << abort(FatalError);
351 }
352
353 type_ = TMP;
354 ptr_ = tPtr;
355}
356
357
358template<class T>

Callers

nothing calls this directly

Calls 5

uniqueMethod · 0.80
clearFunction · 0.50
abortFunction · 0.50
isTmpMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected