minetestmapper/include/util.h

22 lines
391 B
C
Raw Normal View History

#pragma once
2014-07-08 14:54:27 +02:00
#include <string>
2022-02-09 22:46:07 +01:00
#include <iostream>
template<typename T>
static inline T mymax(T a, T b)
{
return (a > b) ? a : b;
}
template<typename T>
static inline T mymin(T a, T b)
{
return (a > b) ? b : a;
}
2014-07-08 14:54:27 +02:00
2018-03-25 14:32:11 +02:00
std::string read_setting(const std::string &name, std::istream &is);
2014-07-08 14:54:27 +02:00
std::string read_setting_default(const std::string &name, std::istream &is,
const std::string &def);