1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2010-05-17 06:30:21 +00:00
parent ee53c2d94d
commit da79fc4ed3
2 changed files with 46 additions and 44 deletions

View file

@ -25,11 +25,9 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
* @author jcamelon
*/
public class CASTCompoundStatement extends ASTNode implements IASTCompoundStatement, IASTAmbiguityParent {
private IASTStatement [] statements = null;
private IScope scope = null;
public CASTCompoundStatement copy() {
CASTCompoundStatement copy = new CASTCompoundStatement();
for (IASTStatement statement : getStatements())
@ -83,10 +81,8 @@ public class CASTCompoundStatement extends ASTNode implements IASTCompoundStatem
public void replace(IASTNode child, IASTNode other) {
if (statements == null) return;
for( int i = 0; i < statements.length; ++i )
{
if( statements[i] == child )
{
for (int i = 0; i < statements.length; ++i) {
if (statements[i] == child) {
other.setParent(statements[i].getParent());
other.setPropertyInParent(statements[i].getPropertyInParent());
statements[i] = (IASTStatement) other;

View file

@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.c;
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.ITypedef;
import org.eclipse.cdt.core.dom.ast.c.ICPointerType;
@ -88,7 +89,7 @@ public class CPointerType implements ICPointerType, ITypeContainer, ISerializabl
try {
t = (IType) super.clone();
} catch (CloneNotSupportedException e) {
//not going to happen
// Not going to happen.
}
return t;
}
@ -110,4 +111,9 @@ public class CPointerType implements ICPointerType, ITypeContainer, ISerializabl
IType nested= buffer.unmarshalType();
return new CPointerType(nested, firstByte/ITypeMarshalBuffer.FLAG1);
}
@Override
public String toString() {
return ASTTypeUtil.getType(this);
}
}