tmxlite
1.0.0
lightweight parse for Tiled maps
include
tmxlite
detail
Android.hpp
1
/*********************************************************************
2
Matt Marchant 2016
3
http://trederia.blogspot.com
4
5
tmxlite - Zlib license.
6
7
This software is provided 'as-is', without any express or
8
implied warranty. In no event will the authors be held
9
liable for any damages arising from the use of this software.
10
11
Permission is granted to anyone to use this software for any purpose,
12
including commercial applications, and to alter it and redistribute
13
it freely, subject to the following restrictions:
14
15
1. The origin of this software must not be misrepresented;
16
you must not claim that you wrote the original software.
17
If you use this software in a product, an acknowledgment
18
in the product documentation would be appreciated but
19
is not required.
20
21
2. Altered source versions must be plainly marked as such,
22
and must not be misrepresented as being the original software.
23
24
3. This notice may not be removed or altered from any
25
source distribution.
26
*********************************************************************/
27
28
#ifndef ANDROID_INC_HPP_
29
#define ANDROID_INC_HPP_
30
#ifdef __ANDROID__
31
32
#include <string>
33
#include <sstream>
34
35
#include <cstdlib>
36
37
namespace
std
38
{
39
template
<
typename
T>
40
std::string to_string(T value)
41
{
42
std::ostringstream os;
43
os << value;
44
return
os.str();
45
}
46
}
47
48
#define STOI(str) std::strtol(str.c_str(), 0, 10)
49
#else
50
#define STOI(str) std::stoi(str)
51
52
#endif
// __ANDROID__
53
#endif
// ANDROID_INC_HPP_
Generated by
1.10.0