MCPcopy Create free account
hub / github.com/crawl/crawl / split_parse

Method split_parse

crawl-ref/source/initfile.cc:3773–3799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3771}
3772
3773void game_options::split_parse(const opt_parse_state &state,
3774 const string &separator,
3775 void (game_options::*add)(const string &, bool),
3776 void (game_options::*remove)(const string &),
3777 bool case_sensitive)
3778{
3779 const string &s = case_sensitive ? state.raw_field : state.field;
3780
3781 if (remove && state.minus_equal())
3782 {
3783 _base_split_parse(s, separator,
3784 [this, remove](const string &x, bool)
3785 {
3786 (this->*remove)(x);
3787 });
3788 }
3789
3790 if (add && (state.add_equal() || state.plain()))
3791 {
3792 _base_split_parse(s, separator,
3793 [this, add](const string &x, bool b)
3794 {
3795 (this->*add)(x, b);
3796 },
3797 state.caret_equal());
3798 }
3799}
3800
3801void base_game_options::set_from_defaults(const string &opt)
3802{

Callers

nothing calls this directly

Calls 5

_base_split_parseFunction · 0.85
minus_equalMethod · 0.80
add_equalMethod · 0.80
plainMethod · 0.80
caret_equalMethod · 0.80

Tested by

no test coverage detected