Changeset 129:38d30c5ceaf3 in rrlib_finroc_core_utils-java


Ignore:
Timestamp:
14.07.2019 23:15:03 (3 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Tags:
tip
Message:

Removes obsolete/unnecessary casts in ChunkedBuffer (as indicated by Eclipse)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jc/stream/ChunkedBuffer.java

    r128 r129  
    174174        // any changes? if not, wait for change... 
    175175        long written = writtenBytes; 
    176         if ((long)(bc.virtualPosition + buffer.position + len) > written) { 
    177             assert((long)(bc.virtualPosition + buffer.position) <= written) : "Programming error as it seems"; 
     176        if (bc.virtualPosition + buffer.position + len > written) { 
     177            assert(bc.virtualPosition + buffer.position <= written) : "Programming error as it seems"; 
    178178 
    179179            if (!blockingReaders) { 
     
    183183                    while (true) { 
    184184                        written = writtenBytes; 
    185                         if ((long)(bc.virtualPosition + buffer.position + len) <= written) { 
     185                        if (bc.virtualPosition + buffer.position + len <= written) { 
    186186                            break; 
    187187                        } 
     
    244244        BufferChunk bc = (BufferChunk)buffer.customData; 
    245245        //System.out.println(bc.virtualPosition +" + " + buffer.position +" < "+ writtenBytes); 
    246         return ((long)(bc.virtualPosition + buffer.end) < writtenBytes); 
     246        return (bc.virtualPosition + buffer.end < writtenBytes); 
    247247    } 
    248248 
     
    282282 
    283283            // keep buffer, but commit new write position 
    284             assert(writtenBytes <= (long)(bc.virtualPosition + buffer.position)); 
     284            assert(writtenBytes <= bc.virtualPosition + buffer.position); 
    285285            bc.curSize.set(0, buffer.position); 
    286286            return true; 
     
    435435            assert(inputStreamBuffer == user); 
    436436            BufferChunk bc = (BufferChunk)buffer.customData; 
    437             return (long)(bc.virtualPosition + buffer.end) < writtenBytes; 
     437            return bc.virtualPosition + buffer.end < writtenBytes; 
    438438        } 
    439439 
Note: See TracChangeset for help on using the changeset viewer.