| 332 | |
| 333 | template<class T> |
| 334 | inline 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 | |
| 358 | template<class T> |