MCPcopy Create free account
hub / github.com/HailToDodongo/pyrite64 / align

Method align

src/utils/binaryFile.h:168–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 }
167
168 void align(uint32_t alignment) {
169 uint32_t pos = getPos();
170 uint32_t offset = pos % alignment;
171 if(offset != 0) {
172 uint32_t padding = alignment - offset;
173 for(uint32_t i=0; i<padding; ++i) {
174 write<uint8_t>(0);
175 }
176 }
177 }
178
179 uint32_t getSize() const {
180 return dataSize;

Callers 1

buildFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected