Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
OlafvdSpek committed Oct 24, 2021
1 parent 2b1f7c8 commit b8a746c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
15 changes: 1 addition & 14 deletions misc/pkt_ts_ini_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@
static const char* section_code[] = {"multimaps", "unknown"};
static const char* map_code[] = {"description", "cd", "minplayers", "maxplayers", "gamemode", "unknown"};

Cmap_data::Cmap_data()
{
m_cd = "0,1";
m_min_players = 0;
m_max_players = 0;
m_gamemode = "standard";
}

Cpkt_ts_ini_reader::Cpkt_ts_ini_reader()
{
m_section = sei_unknown;
}

void Cpkt_ts_ini_reader::erase()
{
m_map_list.clear();
Expand Down Expand Up @@ -113,4 +100,4 @@ void Cpkt_ts_ini_reader::write_report(ostream& os) const
}
os << "</table>";
// os << page;
}
}
15 changes: 6 additions & 9 deletions misc/pkt_ts_ini_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
class Cmap_data
{
public:
Cmap_data();

string m_description;
string m_cd;
int m_min_players;
int m_max_players;
string m_gamemode;
string m_cd = "0,1";
int m_min_players = 0;
int m_max_players = 0;
string m_gamemode = "standard";
};

class Cpkt_ts_ini_reader : public Cini_reader
Expand All @@ -21,20 +19,19 @@ class Cpkt_ts_ini_reader : public Cini_reader
enum t_map_id {mai_description, mai_cd, mai_minplayers, mai_maxplayers, mai_gamemode, mai_unknown};
using t_map_list = map<string, Cmap_data>;

Cpkt_ts_ini_reader();
void erase();
int process_section_start(const string& line);
bool process_section() const;
int process_key(const string& name, const string& value);
bool is_valid() const;
void write_report(ostream& os) const;
void write_report(ostream&) const;

const t_map_list& get_map_list() const
{
return m_map_list;
}
private:
string m_current_map;
t_section_id m_section;
t_section_id m_section = sei_unknown;
t_map_list m_map_list;
};

0 comments on commit b8a746c

Please sign in to comment.