From afe710853849c52403ce281ec41bf2a33d9403b8 Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Thu, 17 Jan 2008 10:22:42 +0000 Subject: [PATCH] Unnecessary cast to ITypeContainer, bug 215629. --- .../internal/core/pdom/dom/PDOMPointerType.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMPointerType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMPointerType.java index 86fc26bb0fb..99e26afe794 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMPointerType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMPointerType.java @@ -1,14 +1,14 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 QNX Software Systems and others. + * Copyright (c) 2006, 2008 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * QNX - Initial API and implementation - * Markus Schorn (Wind River Systems) - * IBM Corporation + * QNX - Initial API and implementation + * Markus Schorn (Wind River Systems) + * IBM Corporation *******************************************************************************/ package org.eclipse.cdt.internal.core.pdom.dom; @@ -21,6 +21,7 @@ import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.ITypedef; import org.eclipse.cdt.internal.core.Util; import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer; +import org.eclipse.cdt.internal.core.index.IIndexBindingConstants; import org.eclipse.cdt.internal.core.index.IIndexType; import org.eclipse.cdt.internal.core.index.PointerTypeClone; import org.eclipse.cdt.internal.core.pdom.PDOM; @@ -36,6 +37,7 @@ public class PDOMPointerType extends PDOMNode implements IPointerType, private static final int FLAGS = PDOMNode.RECORD_SIZE + 0; // byte private static final int TYPE = PDOMNode.RECORD_SIZE + 1; + @SuppressWarnings("hiding") protected static final int RECORD_SIZE = PDOMNode.RECORD_SIZE + 5; private static final int CONST = 0x1; @@ -52,7 +54,7 @@ public class PDOMPointerType extends PDOMNode implements IPointerType, try { // type - IType targetType = ((ITypeContainer)type).getType(); + IType targetType= type.getType(); int typeRec = 0; if (type != null) { PDOMNode targetTypeNode = getLinkageImpl().addType(this, targetType); @@ -78,7 +80,7 @@ public class PDOMPointerType extends PDOMNode implements IPointerType, } public int getNodeType() { - return PDOMLinkage.POINTER_TYPE; + return IIndexBindingConstants.POINTER_TYPE; } private byte getFlags() throws CoreException {