WIP: Added page showing list of functions.
Only list is shown, still working on details.
This commit is contained in:
parent
7db859737a
commit
840af1e0a9
19 changed files with 635 additions and 92 deletions
14
core/std_utils.h
Normal file
14
core/std_utils.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef STD_UTILS_H
|
||||
#define STD_UTILS_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
template <typename T>
|
||||
const T& value_or(const std::vector<T> &vec, const size_t index, const T &def)
|
||||
{
|
||||
if (index < 0 || index >= vec.size())
|
||||
return def;
|
||||
return vec[index];
|
||||
}
|
||||
|
||||
#endif // STD_UTILS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue