forked from qt-creator/qt-creator
Clang: Helper function to get token IconType
Change-Id: I9de562102eded9391ab0d6b895b8d812e259efd6 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <ostream>
|
||||
@@ -110,6 +111,13 @@ public:
|
||||
std::array<T, MaxSize>::fill(T{});
|
||||
}
|
||||
|
||||
bool contains(const T &item) const
|
||||
{
|
||||
return std::any_of(begin(), end(), [&item](const T ¤t) {
|
||||
return item == current;
|
||||
});
|
||||
}
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &out, SizedArray array)
|
||||
{
|
||||
out << "[";
|
||||
|
||||
Reference in New Issue
Block a user