From 65ff960cdf89b4507be3ed6a0defd0f77a408c79 Mon Sep 17 00:00:00 2001 From: Blake Kaplan Date: Mon, 30 Mar 2009 16:33:54 -0700 Subject: [PATCH] Bug 486029 - Use C++ style casts in more places. r=brendan --- js/src/jsopcode.cpp | 6 +++--- js/src/jsxml.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp index 99c762811bb5..c4708edd2529 100644 --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -980,9 +980,9 @@ PushOff(SprintStack *ss, ptrdiff_t off, JSOp op) /* The opcodes stack must contain real bytecodes that index js_CodeSpec. */ ss->offsets[top] = off; - ss->opcodes[top] = (op == JSOP_GETPROP2) ? (jsbytecode) JSOP_GETPROP - : (op == JSOP_GETELEM2) ? (jsbytecode) JSOP_GETELEM - : (jsbytecode) op; + ss->opcodes[top] = jsbytecode((op == JSOP_GETPROP2) ? JSOP_GETPROP + : (op == JSOP_GETELEM2) ? JSOP_GETELEM + : op); ss->top = ++top; AddParenSlop(ss); return JS_TRUE; diff --git a/js/src/jsxml.cpp b/js/src/jsxml.cpp index 071595d15c23..9676dcef6f13 100644 --- a/js/src/jsxml.cpp +++ b/js/src/jsxml.cpp @@ -3315,7 +3315,7 @@ DeepCopyInLRS(JSContext *cx, JSXML *xml, uintN flags) JS_CHECK_RECURSION(cx, return NULL); - copy = js_NewXML(cx, (JSXMLClass) xml->xml_class); + copy = js_NewXML(cx, JSXMLClass(xml->xml_class)); if (!copy) return NULL; qn = xml->name; @@ -3755,7 +3755,7 @@ Replace(JSContext *cx, JSXML *xml, uint32 i, jsval v) vxml = (JSXML *) JS_GetPrivate(cx, vobj); } - switch (vxml ? (JSXMLClass) vxml->xml_class : JSXML_CLASS_LIMIT) { + switch (vxml ? JSXMLClass(vxml->xml_class) : JSXML_CLASS_LIMIT) { case JSXML_CLASS_ELEMENT: /* OPTION: enforce that descendants have superset namespaces. */ if (!CheckCycle(cx, xml, vxml))