1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Unnecessary cast to ITypeContainer, bug 215629.

This commit is contained in:
Markus Schorn 2008-01-17 10:22:42 +00:00
parent c4399d7061
commit afe7108538

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* QNX - Initial API and implementation * QNX - Initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
* IBM Corporation * IBM Corporation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.pdom.dom; 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.core.dom.ast.ITypedef;
import org.eclipse.cdt.internal.core.Util; import org.eclipse.cdt.internal.core.Util;
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer; 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.IIndexType;
import org.eclipse.cdt.internal.core.index.PointerTypeClone; import org.eclipse.cdt.internal.core.index.PointerTypeClone;
import org.eclipse.cdt.internal.core.pdom.PDOM; 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 FLAGS = PDOMNode.RECORD_SIZE + 0; // byte
private static final int TYPE = PDOMNode.RECORD_SIZE + 1; private static final int TYPE = PDOMNode.RECORD_SIZE + 1;
@SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMNode.RECORD_SIZE + 5; protected static final int RECORD_SIZE = PDOMNode.RECORD_SIZE + 5;
private static final int CONST = 0x1; private static final int CONST = 0x1;
@ -52,7 +54,7 @@ public class PDOMPointerType extends PDOMNode implements IPointerType,
try { try {
// type // type
IType targetType = ((ITypeContainer)type).getType(); IType targetType= type.getType();
int typeRec = 0; int typeRec = 0;
if (type != null) { if (type != null) {
PDOMNode targetTypeNode = getLinkageImpl().addType(this, targetType); PDOMNode targetTypeNode = getLinkageImpl().addType(this, targetType);
@ -78,7 +80,7 @@ public class PDOMPointerType extends PDOMNode implements IPointerType,
} }
public int getNodeType() { public int getNodeType() {
return PDOMLinkage.POINTER_TYPE; return IIndexBindingConstants.POINTER_TYPE;
} }
private byte getFlags() throws CoreException { private byte getFlags() throws CoreException {