tests: Use MakeUnique to construct objects owned by unique_ptrs

This commit is contained in:
practicalswift
2018-09-21 11:03:21 +02:00
parent 8f464549c4
commit b6718e373e
9 changed files with 20 additions and 15 deletions

View File

@@ -439,6 +439,11 @@ General C++
- *Rationale*: This avoids memory and resource leaks, and ensures exception safety
- Use `MakeUnique()` to construct objects owned by `unique_ptr`s
- *Rationale*: `MakeUnique` is concise and ensures exception safety in complex expressions.
`MakeUnique` is a temporary project local implementation of `std::make_unique` (C++14).
C++ data structures
--------------------