Changeset 15:acb9ad28fa9e in rrlib_uri


Ignore:
Timestamp:
12.12.2020 22:44:25 (4 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Children:
16:0e06aed7cb7d, 17:1b2e312c7b52
Phase:
public
Message:

Fixes clang compiler error (variable length array of non-POD element type)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tPath.cpp

    r9 r15  
    9696tPath tPath::Append(const tPath& append) const 
    9797{ 
    98   tStringRange buffer[Size() + append.Size()]; 
     98  size_t required_string_ranges = Size() + append.Size(); 
     99  char string_range_memory[required_string_ranges * sizeof(tStringRange) + 1]; 
     100  memset(string_range_memory, 0, sizeof(string_range_memory)); 
     101  tStringRange* buffer = reinterpret_cast<tStringRange*>(string_range_memory); 
    99102  for (size_t i = 0; i < Size(); i++) 
    100103  { 
Note: See TracChangeset for help on using the changeset viewer.