Skip to content

RF: More explicit down-casts, to avoid errors on strict compilers

Paul McCarthy requested to merge rf/macos-compile-errors into master

Fix some more down-cast errors which I didn't catch last time - these lines were productin errors like that below, when compiled with the conda-forge macOS compiler:

csv.cc:391:22: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing]                         
  float line[2][3]={{x1(1),x1(2),x1(3)},{x2(1),x2(2),x2(3)}};                                                                                                  
                     ^~~~~                                                                                                                                     
csv.cc:391:22: note: insert an explicit cast to silence this issue                                                                                             
  float line[2][3]={{x1(1),x1(2),x1(3)},{x2(1),x2(2),x2(3)}};                                                                                                  
                     ^~~~~                                                                                                                                     
                     static_cast<float>( ) 

Merge request reports