From e29f3e74f71ea730519ff8ae1d8dd4c1630bbaf9 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Tue, 8 Jun 2010 15:40:48 -0700 Subject: Begin using reflected files. Change-Id: I5307a0eac9c206b85c0cf7451d3f8300134bf8e3 --- libs/rs/rsScriptC.cpp | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'libs/rs/rsScriptC.cpp') diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 374a07f923ab..ef372860a9e6 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -196,32 +196,9 @@ void ScriptC::Invoke(Context *rsc, uint32_t slot, const void *data, uint32_t len setupScript(rsc); Script * oldTLS = setTLS(this); - const uint32_t * dPtr = (const uint32_t *)data; - switch(len) { - case 0: - mEnviroment.mInvokeFunctions[slot](); - break; - case 4: - ((void (*)(uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0]); - break; - case 8: - ((void (*)(uint32_t, uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0], dPtr[1]); - break; - case 12: - ((void (*)(uint32_t, uint32_t, uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0], dPtr[1], dPtr[2]); - break; - case 16: - ((void (*)(uint32_t, uint32_t, uint32_t, uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0], dPtr[1], dPtr[2], dPtr[3]); - break; - case 20: - ((void (*)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0], dPtr[1], dPtr[2], dPtr[3], dPtr[4]); - break; - } + ((void (*)(const void *, uint32_t)) + mEnviroment.mInvokeFunctions[slot])(data, len); + setTLS(oldTLS); } -- cgit v1.2.3-59-g8ed1b