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

Code formatting.

This commit is contained in:
Sergey Prigogin 2008-10-12 23:48:09 +00:00
parent d2c1866cb7
commit cb5c6721aa
2 changed files with 55 additions and 57 deletions

View file

@ -2086,7 +2086,6 @@ public class CPPSemantics {
currFnCost[j] = cost;
}
hasWorse = false;
hasBetter = false;
// In order for this function to be better than the previous best, it must

View file

@ -42,9 +42,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.OverloadableOperator;
*/
public class SemanticUtil {
private static final char[] OPERATOR_CHARS = Keywords.OPERATOR.toCharArray();
/**
* Cache of overloadable operator names for fast lookup. Used by isConversionOperator.
*/
// Cache of overloadable operator names for fast lookup. Used by isConversionOperator.
private static final CharArraySet cas= new CharArraySet(OverloadableOperator.values().length);
static {
@ -56,11 +54,11 @@ public class SemanticUtil {
}
/**
* Returns a list of ICPPMethod objects representing all conversion operators
* Returns an array of ICPPMethod objects representing all conversion operators
* declared by the specified class. This does not include inherited methods. Conversion
* operators cannot be implicit.
* @param clazz
* @return List of ICPPMethod
* @return an array of conversion operators.
*/
public static final ICPPMethod[] getDeclaredConversionOperators(ICPPClassType clazz) throws DOMException {
ICPPMethod[] methods= new ICPPMethod[0];
@ -79,11 +77,11 @@ public class SemanticUtil {
}
/**
* Returns a list of ICPPMethod objects representing all conversion operators
* Returns an array of ICPPMethod objects representing all conversion operators
* declared by the specified class and its ancestors. This includes inherited
* methods. Conversion operators cannot be implicit.
* @param clazz
* @return List of ICPPMethod
* @return an array of conversion operators.
*/
public static ICPPMethod[] getConversionOperators(ICPPClassType clazz) throws DOMException {
ICPPMethod[] methods= new ICPPMethod[0];
@ -175,17 +173,18 @@ public class SemanticUtil {
type= tt;
} else if (type instanceof IQualifierType) {
type= ((IQualifierType) type).getType();
} else if( stopAtPointerToMember && type instanceof ICPPPointerToMemberType )
} else if (stopAtPointerToMember && type instanceof ICPPPointerToMemberType) {
return type;
else if( type instanceof IPointerType ) {
} else if (type instanceof IPointerType) {
if (lastPointerType!=null) {
lastPointerType[0]= type;
}
type= ((IPointerType) type).getType();
} else if (type instanceof ICPPReferenceType) {
type= ((ICPPReferenceType) type).getType();
} else
} else {
return type;
}
}
} catch (DOMException e) {
@ -211,9 +210,10 @@ public class SemanticUtil {
type = ((IQualifierType) type).getType();
} else if (type instanceof ICPPReferenceType) {
type = ((ICPPReferenceType) type).getType();
} else
} else {
return type;
}
}
} catch (DOMException e) {
return e.getProblem();
}
@ -292,5 +292,4 @@ public class SemanticUtil {
}
return result;
}
}