The Battle for Wesnoth  1.15.0+dev
movement.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2018 by Jyrki Vesterinen <sandgtx@gmail.com>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License version 2
7  or at your option any later version.
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY.
10 
11  See the COPYING file for more details.
12 */
13 
14 #pragma once
15 
16 #include "gettext.hpp"
17 #include "tstring.hpp"
18 
20 {
21  const t_string& name;
22  int moves;
23 
24  terrain_movement(const t_string& name_, int moves_)
25  : name(name_), moves(moves_)
26  {}
27 
28  bool operator<(const terrain_movement& other) const
29  {
30  return translation::icompare(name, other.name) < 0;
31  }
32 };
const t_string & name
Definition: movement.hpp:21
bool operator<(const terrain_movement &other) const
Definition: movement.hpp:28
terrain_movement(const t_string &name_, int moves_)
Definition: movement.hpp:24
int icompare(const std::string &s1, const std::string &s2)
Case-insensitive lexicographical comparison.
Definition: gettext.cpp:476