diff --git a/include/openmc/plot.h b/include/openmc/plot.h index 8d9a11ff9..a71b8926c 100644 --- a/include/openmc/plot.h +++ b/include/openmc/plot.h @@ -35,7 +35,7 @@ extern std::vector plots; //!< Plot instance container // RGBColor holds color information for plotted objects //=============================================================================== -typedef std::array RGBColor; +typedef std::array RGBColor; typedef xt::xtensor ImageData; diff --git a/src/plot.cpp b/src/plot.cpp index aa649c531..e08606787 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -37,7 +37,7 @@ int n_plots; std::vector plots; -const RGBColor WHITE = {static_cast(255), static_cast(255), static_cast(255)}; +const RGBColor WHITE {static_cast(255), static_cast(255), static_cast(255)}; const RGBColor NULLRGB = {0, 0, 0}; //============================================================================== @@ -740,9 +740,9 @@ void output_ppm(Plot pl, const ImageData& data) for (int y = 0; y < pl.pixels_[1]; y++) { for (int x = 0; x < pl.pixels_[0]; x++) { RGBColor rgb = data(x,y); - of.write(&rgb[RED], 1); - of.write(&rgb[GREEN], 1); - of.write(&rgb[BLUE], 1); + of.write(reinterpret_cast(&rgb[RED]), 1); + of.write(reinterpret_cast(&rgb[GREEN]), 1); + of.write(reinterpret_cast(&rgb[BLUE]), 1); } } // Close file