MCPcopy Create free account
hub / github.com/ErrorFlynn/ytdlp-interface / timepoint

Method timepoint

ytdlp-interface/forms/form_sections.cpp:157–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 struct timepoint
156 {
157 timepoint(string str)
158 {
159 vector<int> vals, hms {0, 0, 0};
160 stringstream ss {str};
161 for(string val; getline(ss, val, ':');)
162 vals.push_back(stoi(val));
163 for(auto it_src {vals.rbegin()}, it_dest {hms.rbegin()}; it_src != vals.rend(); it_src++, it_dest++)
164 *it_dest = *it_src;
165 value = chrono::hours {hms[0]} + chrono::minutes{hms[1]} + chrono::seconds{hms[2]};
166 }
167 bool operator < (const timepoint &o) { return value < o.value; }
168 bool operator > (const timepoint &o) { return value > o.value; }
169 //bool operator == (const timepoint &o) { return value == o.value; }

Callers

nothing calls this directly

Calls 2

rbeginMethod · 0.80
rendMethod · 0.80

Tested by

no test coverage detected