mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
packs manager (unused yet)
This commit is contained in:
parent
68320629de
commit
95fedfa3a3
3 changed files with 175 additions and 1 deletions
|
|
@ -1,13 +1,20 @@
|
|||
#ifndef UTIL_LISTUTIL_H_
|
||||
#define UTIL_LISTUTIL_H_
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
|
||||
namespace util {
|
||||
template<class T>
|
||||
bool contains(std::vector<T> vec, const T& value) {
|
||||
bool contains(const std::vector<T>& vec, const T& value) {
|
||||
return std::find(vec.begin(), vec.end(), value) != vec.end();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
bool contains(const std::queue<T>& queue, const T& value) {
|
||||
return std::find(queue.begin(), queue.end(), value) != queue.end();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // UTIL_LISTUTIL_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue