X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fglretrace_cgl.cpp;h=73bb250c4a4b58bf5b19d63337fa6bcadff58739;hb=d79c9a22244ebc7aba491ad50ef2edced6c00d88;hp=f0d0e2d7d5b29ff4ee0232d479fab8b408374de9;hpb=624b5ece4ef3fe429f337776937d267f73a1d8fa;p=apitrace diff --git a/retrace/glretrace_cgl.cpp b/retrace/glretrace_cgl.cpp index f0d0e2d..73bb250 100644 --- a/retrace/glretrace_cgl.cpp +++ b/retrace/glretrace_cgl.cpp @@ -127,7 +127,7 @@ getContext(unsigned long long ctx) { static void retrace_CGLChoosePixelFormat(trace::Call &call) { int profile = kCGLOGLPVersion_Legacy; - const trace::Array * attribs = dynamic_cast(&call.arg(0)); + const trace::Array * attribs = call.arg(0).toArray(); if (attribs) { size_t i = 0; while (i < attribs->values.size()) { @@ -201,7 +201,7 @@ static void retrace_CGLCreateContext(trace::Call &call) { unsigned long long share = call.arg(1).toUIntPtr(); Context *sharedContext = getContext(share); - const trace::Array *ctx_ptr = dynamic_cast(&call.arg(2)); + const trace::Array *ctx_ptr = call.arg(2).toArray(); unsigned long long ctx = ctx_ptr->values[0]->toUIntPtr(); Context *context = glretrace::createContext(sharedContext);