mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
artf4107: clang-modernize was run on WPILib
Loops were converted to their range-based equivalents, variable types were replaced with auto where the type was already specified on the same line, the override keyword was added, and instances of NULL and assignments of 0 to pointers were replaced with nullptr. Change-Id: If281e46a2e2e1c37f278d56df9915236d4b2c864
This commit is contained in:
@@ -30,8 +30,8 @@ Resource::Resource(uint32_t elements) {
|
||||
/**
|
||||
* Factory method to create a Resource allocation-tracker *if* needed.
|
||||
*
|
||||
* @param r -- address of the caller's Resource pointer. If *r == NULL, this
|
||||
* will construct a Resource and make *r point to it. If *r != NULL, i.e.
|
||||
* @param r -- address of the caller's Resource pointer. If *r == nullptr, this
|
||||
* will construct a Resource and make *r point to it. If *r != nullptr, i.e.
|
||||
* the caller already has a Resource instance, this won't do anything.
|
||||
* @param elements -- the number of elements for this Resource allocator to
|
||||
* track, that is, it will allocate resource numbers in the range
|
||||
@@ -40,7 +40,7 @@ Resource::Resource(uint32_t elements) {
|
||||
/*static*/ void Resource::CreateResourceObject(Resource **r,
|
||||
uint32_t elements) {
|
||||
Synchronized sync(m_createLock);
|
||||
if (*r == NULL) {
|
||||
if (*r == nullptr) {
|
||||
*r = new Resource(elements);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user