Changeset 171:af7a7f7a0e47 in finroc_plugins_data_ports


Ignore:
Timestamp:
06.02.2021 21:41:39 (17 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Children:
172:92474d0c642c, 173:2e0978d412b6
Phase:
public
Message:

Fixes compiler warnings that appear with additional non-default warning options enabled

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • api/tGenericPortImplementation.cpp

    r161 r171  
    105105      port.CopyCurrentValueToGenericObject(*buffer.Get(), timestamp, strategy); 
    106106      buffer.SetTimestamp(timestamp); 
    107       return std::move(buffer); 
     107      return buffer; 
    108108    } 
    109109#ifndef RRLIB_SINGLE_THREADED 
  • common/tAbstractDataPortCreationInfo.h

    r155 r171  
    211211    {} 
    212212 
    213     tStorage(const tStorage& o) 
     213    tStorage(const tStorage& o) : 
     214      rrlib::serialization::tStackMemoryBuffer<INITIAL_SIZE>(5, true) 
    214215    { 
    215216      this->CopyFrom(o); 
  • optimized/cheaply_copied_types.cpp

    r123 r171  
    104104{ 
    105105  uint32_t result = (type.GetSize() <= cPOOL_BUFFER_SIZE_STEP) ? 0 : ((type.GetSize() - 1) / cPOOL_BUFFER_SIZE_STEP); 
    106   assert(result >= 0 && result < cMAX_SIZE_CHEAPLY_COPIED_TYPES / cPOOL_BUFFER_SIZE_STEP); 
     106  assert(result < cMAX_SIZE_CHEAPLY_COPIED_TYPES / cPOOL_BUFFER_SIZE_STEP); 
    107107  return result; 
    108108} 
  • optimized/tSingleThreadedCheapCopyPortGeneric.cpp

    r131 r171  
    178178bool tSingleThreadedCheapCopyPortGeneric::NonStandardAssign(tPublishingData& publishing_data, tChangeStatus change_constant) 
    179179{ 
    180   throw std::logic_error("Only implemented for/in subclasses"); 
     180  assert(change_constant == tChangeStatus::NO_CHANGE && "Only implemented for/in subclasses"); 
     181  return false; 
    181182} 
    182183 
Note: See TracChangeset for help on using the changeset viewer.