MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / pack32

Method pack32

src/helper.cpp:701–703  ·  view source on GitHub ↗

Pack bytes into a 16- or 32-byte variable

Source from the content-addressed store, hash-verified

699
700// Pack bytes into a 16- or 32-byte variable
701uint32_t Helper::pack32(uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3) {
702 return (uint32_t) c0 | ((uint32_t) c1 << 8) | ((uint32_t) c2 << 16) | ((uint32_t) c3 << 24);
703}
704uint16_t Helper::pack16(uint8_t c0, uint8_t c1) {
705 return (uint32_t) c0 | ((uint32_t) c1 << 8);
706}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected