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

Function jsonToVec4B

source/core/StarJsonExtra.cpp:114–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114Vec4B jsonToVec4B(Json const& v) {
115 if (v.type() != Json::Type::Array || v.size() != 4)
116 throw JsonException("Json not an array of size 4 in jsonToVec4B");
117
118 return Vec4B(v.getInt(0), v.getInt(1), v.getInt(2), v.getInt(3));
119}
120
121Vec4I jsonToVec4I(Json const& v) {
122 if (v.type() != Json::Type::Array || v.size() != 4)

Callers 5

LiquidsDatabaseMethod · 0.85
variantMapToTileFunction · 0.85
ImageTilesetMethod · 0.85
loadMethod · 0.85
jsonToVec4BListFunction · 0.85

Calls 3

getIntMethod · 0.80
typeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected