MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / toByteArray

Function toByteArray

source/test/btree_database_test.cpp:14–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12 uint32_t const MaxKey = 100000;
13
14 ByteArray toByteArray(uint32_t k) {
15 k = toBigEndian(k);
16 return ByteArray((char*)(&k), sizeof(k));
17 }
18
19 ByteArray genBlock(uint32_t k) {
20 // Make sure not empty, because we test for existence with empty()

Callers 4

putAllFunction · 0.85
checkAllFunction · 0.85
removeAllFunction · 0.85
TESTFunction · 0.85

Calls 2

toBigEndianFunction · 0.85
ByteArrayClass · 0.85

Tested by

no test coverage detected