mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Boost the warning of the compiler and fix the unnecessary
casting
This commit is contained in:
parent
ef50454dbd
commit
05195a0a7d
13 changed files with 21 additions and 14 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-03-22 Alain Magloire
|
||||
|
||||
Boost the warning of the compiler and remove
|
||||
Unneeded castings.
|
||||
|
||||
* to many to enumerates.
|
||||
|
||||
2004-03-22 Alain Magloire
|
||||
|
||||
* model/org/eclipse/cdt/core/model/CoreModel.java
|
||||
|
|
|
@ -352,7 +352,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
|||
} else {
|
||||
Openable openableParent = (Openable)getOpenableParent();
|
||||
if (openableParent != null) {
|
||||
CElementInfo openableParentInfo = (CElementInfo) CModelManager.getDefault().getInfo((ICElement) openableParent);
|
||||
CElementInfo openableParentInfo = (CElementInfo) CModelManager.getDefault().getInfo(openableParent);
|
||||
if (openableParentInfo == null) {
|
||||
openableParent.openWhenClosed(null);
|
||||
}
|
||||
|
|
|
@ -398,7 +398,7 @@ public class CElementDelta implements ICElementDelta {
|
|||
if (equalsAndSameParent(delta.getElement(), element)) { // handle case of two jars that can be equals but not in the same project
|
||||
return delta;
|
||||
} else {
|
||||
delta = ((CElementDelta)delta).getDeltaFor(element);
|
||||
delta = delta.getDeltaFor(element);
|
||||
if (delta != null)
|
||||
return delta;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
|||
/**
|
||||
* Singleton OK object
|
||||
*/
|
||||
public static final ICModelStatus VERIFIED_OK = new CModelStatus(OK, OK, org.eclipse.cdt.internal.core.Util.bind("status.OK"));; //$NON-NLS-1$
|
||||
public static final ICModelStatus VERIFIED_OK = new CModelStatus(OK, OK, org.eclipse.cdt.internal.core.Util.bind("status.OK")); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Constructs an C model status with no corresponding elements.
|
||||
|
|
|
@ -62,7 +62,7 @@ public class CommitWorkingCopyOperation extends CModelOperation {
|
|||
try {
|
||||
beginTask("workingCopy.commit", 2); //$NON-NLS-1$
|
||||
WorkingCopy copy = (WorkingCopy)getElementToProcess();
|
||||
ITranslationUnit original = (ITranslationUnit) copy.getOriginalElement();
|
||||
ITranslationUnit original = copy.getOriginalElement();
|
||||
|
||||
|
||||
// creates the delta builder (this remembers the content of the cu)
|
||||
|
@ -127,7 +127,7 @@ public class CommitWorkingCopyOperation extends CModelOperation {
|
|||
return new CModelStatus(ICModelStatusConstants.INVALID_ELEMENT_TYPES, wc);
|
||||
}
|
||||
|
||||
ITranslationUnit original= (ITranslationUnit)wc.getOriginalElement();
|
||||
ITranslationUnit original= wc.getOriginalElement();
|
||||
IResource resource = original.getResource();
|
||||
if (!wc.isBasedOn(resource) && !fForce) {
|
||||
return new CModelStatus(ICModelStatusConstants.UPDATE_CONFLICT);
|
||||
|
|
|
@ -62,7 +62,7 @@ public abstract class CreateElementInTUOperation extends CModelOperation {
|
|||
/**
|
||||
* The element that is being created.
|
||||
*/
|
||||
protected ISourceReference fCreatedElement = null;;
|
||||
protected ISourceReference fCreatedElement = null;
|
||||
|
||||
/**
|
||||
* The element that the newly created element is
|
||||
|
|
|
@ -320,7 +320,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
|||
///////////////////////////////////////////////////////////////
|
||||
|
||||
if (isWorkingCopy()) {
|
||||
ITranslationUnit original = (ITranslationUnit) ((IWorkingCopy)this).getOriginalElement();
|
||||
ITranslationUnit original = ((IWorkingCopy)this).getOriginalElement();
|
||||
// might be IResource.NULL_STAMP if original does not exist
|
||||
IResource r = original.getResource();
|
||||
if (r != null && r instanceof IFile) {
|
||||
|
|
|
@ -70,7 +70,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
|||
*/
|
||||
public void commit(boolean force, IProgressMonitor monitor)
|
||||
throws CModelException {
|
||||
ITranslationUnit original = (ITranslationUnit)this.getOriginalElement();
|
||||
ITranslationUnit original = this.getOriginalElement();
|
||||
if (original.exists()) {
|
||||
CommitWorkingCopyOperation op= new CommitWorkingCopyOperation(this, force);
|
||||
runOperation(op, monitor);
|
||||
|
@ -248,7 +248,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
|||
|
||||
// set the buffer source if needed
|
||||
if (buffer.getCharacters() == null){
|
||||
ITranslationUnit original= (ITranslationUnit)this.getOriginalElement();
|
||||
ITranslationUnit original= this.getOriginalElement();
|
||||
IBuffer originalBuffer = null;
|
||||
try {
|
||||
originalBuffer = original.getBuffer();
|
||||
|
|
|
@ -253,7 +253,7 @@ public class ErrorParserManager extends OutputStream {
|
|||
path = fp;
|
||||
}
|
||||
} else {
|
||||
path = (IPath) getWorkingDirectory().append(filePath);
|
||||
path = getWorkingDirectory().append(filePath);
|
||||
}
|
||||
|
||||
IFile file = null;
|
||||
|
|
|
@ -38,7 +38,7 @@ public class ProcessClosure {
|
|||
fOutputStream= out;
|
||||
fInputStream= in;
|
||||
setDaemon(true);
|
||||
lineSeparator = (String) System.getProperty("line.separator"); //$NON-NLS-1$
|
||||
lineSeparator = System.getProperty("line.separator"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public void run() {
|
||||
|
|
|
@ -106,7 +106,7 @@ public class Symbol implements ISymbol, Comparable {
|
|||
} else if (obj instanceof Long) {
|
||||
Long val = (Long) obj;
|
||||
anotherVal = val.longValue();
|
||||
thisVal = (long) this.addr;
|
||||
thisVal = this.addr;
|
||||
}
|
||||
return (thisVal < anotherVal ? -1 : (thisVal == anotherVal ? 0 : 1));
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@ public class PE {
|
|||
buffer.append("StackCommit = ").append(SizeOfStackCommit).append(NL); //$NON-NLS-1$
|
||||
buffer.append("HeapReserve = ").append(SizeOfHeapReserve).append(NL); //$NON-NLS-1$
|
||||
buffer.append("HeapCommit = ").append(SizeOfHeapCommit).append(NL); //$NON-NLS-1$
|
||||
buffer.append("LoaderFlags = ").append(LoaderFlags).append(NL);; //$NON-NLS-1$
|
||||
buffer.append("LoaderFlags = ").append(LoaderFlags).append(NL); //$NON-NLS-1$
|
||||
buffer.append("#Rva size = ").append(NumberOfRvaAndSizes).append(NL); //$NON-NLS-1$
|
||||
return buffer.toString();
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class DebugSym implements Comparable {
|
|||
} else if (obj instanceof Long) {
|
||||
Long val = (Long) obj;
|
||||
anotherVal = val.longValue();
|
||||
thisVal = (long) this.addr;
|
||||
thisVal = this.addr;
|
||||
}
|
||||
return (thisVal < anotherVal ? -1 : (thisVal == anotherVal ? 0 : 1));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue