mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use consistent RGBDS_<PROG>_<NAME>_HPP header guard convention
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
#ifndef RGBDS_DEFAULT_INIT_ALLOC_HPP
|
||||
#define RGBDS_DEFAULT_INIT_ALLOC_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
/*
|
||||
* Allocator adaptor that interposes construct() calls to convert value-initialization
|
||||
* (which is what you get with e.g. `vector::resize`) into default-initialization (which does not
|
||||
@@ -6,12 +14,6 @@
|
||||
* https://stackoverflow.com/questions/21028299/is-this-behavior-of-vectorresizesize-type-n-under-c11-and-boost-container/21028912#21028912
|
||||
*/
|
||||
|
||||
#ifndef DEFAULT_INIT_ALLOC_H
|
||||
#define DEFAULT_INIT_ALLOC_H
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
template<typename T, typename A = std::allocator<T>>
|
||||
class default_init_allocator : public A {
|
||||
using a_t = std::allocator_traits<A>;
|
||||
@@ -36,4 +38,4 @@ public:
|
||||
template<typename T>
|
||||
using DefaultInitVec = std::vector<T, default_init_allocator<T>>;
|
||||
|
||||
#endif // DEFAULT_INIT_ALLOC_H
|
||||
#endif // RGBDS_DEFAULT_INIT_ALLOC_HPP
|
||||
|
||||
Reference in New Issue
Block a user