MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/xstudio / make_frame_sequence

Function make_frame_sequence

src/utility/src/sequence.cpp:129–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127Sequence::Sequence(const std::string name) : name_(std::move(name)), frames_() {}
128
129std::string make_frame_sequence(
130 const long start, const long end, const long offset, const bool single = false) {
131 // check for single entry
132 if (start == end) {
133 if (single)
134 return std::to_string(start) + "-" + std::to_string(end);
135
136 return std::to_string(start);
137 }
138
139 if (offset == 1) {
140 return std::to_string(start) + "-" + std::to_string(end);
141 }
142 if (end == start + offset) {
143 return std::to_string(start) + "," + std::to_string(end);
144 }
145
146 return std::to_string(start) + "-" + std::to_string(end) + "x" + std::to_string(offset);
147}
148
149struct DefaultSequenceHelper {
150 uint8_t pad_;

Callers 1

make_sequenceMethod · 0.85

Calls 1

to_stringFunction · 0.50

Tested by

no test coverage detected