File: util.h

package info (click to toggle)
minetestmapper 20241111-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 300 kB
  • sloc: cpp: 2,635; python: 143; sh: 68; ansic: 30; makefile: 9
file content (21 lines) | stat: -rw-r--r-- 391 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <string>
#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;
}

std::string read_setting(const std::string &name, std::istream &is);

std::string read_setting_default(const std::string &name, std::istream &is,
	const std::string &def);