MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / CheckArrayLength

Function CheckArrayLength

src/bindings/java/JNIUtil.h:144–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142
143template<typename T>
144inline void CheckArrayLength(JNIEnv * env, const char* name, T ptr, int32_t length) {
145 if(ptr == NULL) return;
146 if(env->GetArrayLength(ptr) < length) {
147 std::ostringstream err;
148 err << name << " needs to have " << length;
149 err << " elements but found only " << env->GetArrayLength(ptr);
150 throw Exception(err.str().c_str());
151 }
152}
153
154class GetJFloatArrayValue
155{

Callers 3

GetJFloatArrayValueMethod · 0.85
SetJFloatArrayValueMethod · 0.85
GetJIntArrayValueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected