mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
Cosmetics.
This commit is contained in:
parent
c516d8d4ab
commit
3fb603c849
2 changed files with 14 additions and 19 deletions
|
@ -8,7 +8,6 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Rational Software - Initial API and implementation
|
* Rational Software - Initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.core.model;
|
package org.eclipse.cdt.internal.core.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
|
@ -23,5 +22,4 @@ public class Function extends FunctionDeclaration implements IFunction {
|
||||||
public Function(ICElement parent, String name, int kind) {
|
public Function(ICElement parent, String name, int kind) {
|
||||||
super(parent, name, kind);
|
super(parent, name, kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
* Anton Leherbauer (Wind River Systems)
|
* Anton Leherbauer (Wind River Systems)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.core.model;
|
package org.eclipse.cdt.internal.core.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.CModelException;
|
import org.eclipse.cdt.core.model.CModelException;
|
||||||
|
@ -63,7 +62,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSignature(IFunctionDeclaration func) {
|
public static String getSignature(IFunctionDeclaration func) {
|
||||||
StringBuffer sig = new StringBuffer(func.getElementName());
|
StringBuilder sig = new StringBuilder(func.getElementName());
|
||||||
sig.append(getParameterClause(func.getParameterTypes()));
|
sig.append(getParameterClause(func.getParameterTypes()));
|
||||||
try {
|
try {
|
||||||
if (func.isConst())
|
if (func.isConst())
|
||||||
|
@ -81,7 +80,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getParameterClause(String[] paramTypes) {
|
public static String getParameterClause(String[] paramTypes) {
|
||||||
StringBuffer sig = new StringBuffer();
|
StringBuilder sig = new StringBuilder();
|
||||||
|
|
||||||
if (paramTypes.length > 0) {
|
if (paramTypes.length > 0) {
|
||||||
sig.append("("); //$NON-NLS-1$
|
sig.append("("); //$NON-NLS-1$
|
||||||
|
@ -92,8 +91,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
sig.append(paramTypes[i++]);
|
sig.append(paramTypes[i++]);
|
||||||
}
|
}
|
||||||
sig.append(")"); //$NON-NLS-1$
|
sig.append(")"); //$NON-NLS-1$
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
sig.append("()"); //$NON-NLS-1$
|
sig.append("()"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
return sig.toString();
|
return sig.toString();
|
||||||
|
@ -187,5 +185,4 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
escapeMementoName(buff, fParameterTypes[i]);
|
escapeMementoName(buff, fParameterTypes[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue