Skip to content
  • Ahmad Samir's avatar
    Make Profile::DefaultPropertyNames a vector instead of built-in array · dfc8e6ed
    Ahmad Samir authored and Tomaz  Canabrava's avatar Tomaz Canabrava committed
    A vector doesn't decay to pointer, so we can iterate over it with range-for
    in Profile and ProfileReader/Writer without using pointers to array
    elements, and a while loop that checks for the special element at the end
    of the array to stop the loop. Also remove that dud element at the end of
    DefaultPropertyNames.
    
    std::array is a viable option, but the downside is we'd have to specify the
    number of elements in it (as that's part of its type), and keeping that
    number in sync when adding new properties could be problematic.
    dfc8e6ed