mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Replace build_unique with make_unique
This was a rarely used convenience function from when we did not yet have c++17 support.
This commit is contained in:
parent
ff612876c5
commit
e2a8dd4db1
3 changed files with 3 additions and 12 deletions
|
@ -563,15 +563,6 @@ void bro_strerror_r(int bro_errno, char* buf, size_t buflen);
|
|||
*/
|
||||
char* zeekenv(const char* name);
|
||||
|
||||
/**
|
||||
* Small convenience function. Does what std::make_unique does in C++14. Will not
|
||||
* work on arrays.
|
||||
*/
|
||||
template <typename T, typename ... Args>
|
||||
std::unique_ptr<T> build_unique (Args&&... args) {
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes bytes in a string that are not valid UTF8 characters with \xYY format. Used
|
||||
* by the JSON writer and BIF methods.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue