summaryrefslogtreecommitdiff
path: root/src/jit/jitstd
diff options
context:
space:
mode:
authorMichelle McDaniel <adiaaida@gmail.com>2016-08-09 13:15:05 -0700
committerMichelle McDaniel <adiaaida@gmail.com>2016-08-11 09:53:41 -0700
commit36a2b906c008cd3693a9ab5aef7b4402addd6c74 (patch)
tree27333c6f26304490169825ae1c17484534246dc6 /src/jit/jitstd
parentab7d6a8df73d3d89210a778338feaa9fedf4146a (diff)
downloadcoreclr-36a2b906c008cd3693a9ab5aef7b4402addd6c74.tar.gz
coreclr-36a2b906c008cd3693a9ab5aef7b4402addd6c74.tar.bz2
coreclr-36a2b906c008cd3693a9ab5aef7b4402addd6c74.zip
Reformat jit sources with clang-tidy and format
This change is the result of running clang-tidy and clang-format on jit sources.
Diffstat (limited to 'src/jit/jitstd')
-rw-r--r--src/jit/jitstd/allocator.h2
-rw-r--r--src/jit/jitstd/list.h24
-rw-r--r--src/jit/jitstd/vector.h2
3 files changed, 14 insertions, 14 deletions
diff --git a/src/jit/jitstd/allocator.h b/src/jit/jitstd/allocator.h
index c09c3ab07c..2bd33daa98 100644
--- a/src/jit/jitstd/allocator.h
+++ b/src/jit/jitstd/allocator.h
@@ -116,7 +116,7 @@ public:
pointer address(reference val);
const_pointer address(const_reference val) const;
- pointer allocate(size_type count, allocator<void>::const_pointer hint = 0);
+ pointer allocate(size_type count, allocator<void>::const_pointer hint = nullptr);
void construct(pointer ptr, const_reference val);
void deallocate(pointer ptr, size_type size);
void destroy(pointer ptr);
diff --git a/src/jit/jitstd/list.h b/src/jit/jitstd/list.h
index 01043e09b5..85545f741e 100644
--- a/src/jit/jitstd/list.h
+++ b/src/jit/jitstd/list.h
@@ -293,8 +293,8 @@ namespace jitstd
{
template <typename T, typename Allocator>
list<T, Allocator>::list(const Allocator& allocator)
- : m_pHead(NULL)
- , m_pTail(NULL)
+ : m_pHead(nullptr)
+ , m_pTail(nullptr)
, m_nSize(0)
, m_allocator(allocator)
, m_nodeAllocator(allocator)
@@ -393,7 +393,7 @@ bool list<T, Allocator>::empty() const
template <typename T, typename Allocator>
typename list<T, Allocator>::iterator list<T, Allocator>::end()
{
- return iterator(NULL);
+ return iterator(nullptr);
}
template <typename T, typename Allocator>
@@ -406,7 +406,7 @@ template <typename T, typename Allocator>
typename list<T, Allocator>::iterator list<T, Allocator>::erase(iterator position)
{
// Nothing to erase.
- assert(position.m_pNode != NULL);
+ assert(position.m_pNode != nullptr);
--m_nSize;
@@ -414,7 +414,7 @@ typename list<T, Allocator>::iterator list<T, Allocator>::erase(iterator positio
Node* pPrev = pNode->m_pPrev;
Node* pNext = pNode->m_pNext;
- if (pPrev != NULL)
+ if (pPrev != nullptr)
{
pPrev->m_pNext = pNext;
}
@@ -423,7 +423,7 @@ typename list<T, Allocator>::iterator list<T, Allocator>::erase(iterator positio
m_pHead = pNext;
}
- if (pNext != NULL)
+ if (pNext != nullptr)
{
pNext->m_pPrev = pPrev;
}
@@ -563,12 +563,12 @@ void list<T, Allocator>::pop_back()
if (m_pHead != m_pTail)
{
m_pTail = m_pTail->m_pPrev;
- m_pTail->m_pNext = NULL;
+ m_pTail->m_pNext = nullptr;
}
else
{
- m_pHead = NULL;
- m_pTail = NULL;
+ m_pHead = nullptr;
+ m_pTail = nullptr;
}
pDelete->~Node();
m_nodeAllocator.deallocate(pDelete, 1);
@@ -664,7 +664,7 @@ void list<T, Allocator>::remove_if(Predicate pred)
template <typename T, typename Allocator>
typename list<T, Allocator>::reverse_iterator list<T, Allocator>::rend()
{
- return reverse_iterator(NULL);
+ return reverse_iterator(nullptr);
}
template <typename T, typename Allocator>
@@ -768,14 +768,14 @@ void list<T, Allocator>::unique(const BinaryPredicate& binary_pred)
template <typename T, typename Allocator>
void list<T, Allocator>::destroy_helper()
{
- while (m_pTail != NULL)
+ while (m_pTail != nullptr)
{
Node* prev = m_pTail->m_pPrev;
m_pTail->~Node();
m_nodeAllocator.deallocate(m_pTail, 1);
m_pTail = prev;
}
- m_pHead = NULL;
+ m_pHead = nullptr;
m_nSize = 0;
}
diff --git a/src/jit/jitstd/vector.h b/src/jit/jitstd/vector.h
index 6cfbfd6ca0..d252e18253 100644
--- a/src/jit/jitstd/vector.h
+++ b/src/jit/jitstd/vector.h
@@ -281,7 +281,7 @@ size_t iterator_difference(InputIterator first, const InputIterator& last)
template <typename T, typename Allocator>
vector<T, Allocator>::vector(const Allocator& allocator)
: m_allocator(allocator)
- , m_pArray(NULL)
+ , m_pArray(nullptr)
, m_nSize(0)
, m_nCapacity(0)
{