コード例 #1
0
  public void moveIntoSameType(
      VarBufferPos buffer, VarDefBuffer varSource, VarBufferPos bufferSource) {
    if (m_nTotalSize == varSource.m_nTotalSize) // Same type and same size: Directly copy bytes
    {
      int nPositionDest = buffer.m_nAbsolutePosition;
      int nPositionSource = bufferSource.m_nAbsolutePosition;
      if (BufferSpy.BUFFER_WRITE_DEBUG)
        BufferSpy.prewrite(buffer.m_acBuffer, nPositionDest, m_nTotalSize);
      for (int n = 0; n < m_nTotalSize; n++) {
        buffer.m_acBuffer[nPositionDest++] = bufferSource.m_acBuffer[nPositionSource++];
      }
      if (BufferSpy.BUFFER_WRITE_DEBUG) BufferSpy.endwrite();
      return;
    }

    long l = varSource.getAsDecodedLong(bufferSource);
    writeSignSeparatedLeadingIntComp0AsLong(buffer, l);
  }