MCPcopy Create free account
hub / github.com/Haivision/srt / ParseLogFASpec

Function ParseLogFASpec

apps/logsupport.cpp:174–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void ParseLogFASpec(const vector<string>& speclist, string& w_on, string& w_off)
175{
176 std::ostringstream son, soff;
177
178 for (auto& s: speclist)
179 {
180 string name;
181 bool on = true;
182 if (s[0] == '+')
183 name = s.substr(1);
184 else if (s[0] == '~')
185 {
186 name = s.substr(1);
187 on = false;
188 }
189 else
190 name = s;
191
192 if (on)
193 son << "," << name;
194 else
195 soff << "," << name;
196 }
197
198 const string& sons = son.str();
199 const string& soffs = soff.str();
200
201 w_on = sons.empty() ? string() : sons.substr(1);
202 w_off = soffs.empty() ? string() : soffs.substr(1);
203}
204
205

Callers 1

mainFunction · 0.85

Calls 2

strMethod · 0.45
emptyMethod · 0.45

Tested by 1

mainFunction · 0.68