AMReX-Astro / Castro

Castro (Compressible Astrophysics): An adaptive mesh, astrophysical compressible (radiation-, magneto-) hydrodynamics simulation code for massively parallel CPU and GPU architectures.
http://amrex-astro.github.io/Castro
Other
293 stars 99 forks source link

get rid of asctime -- it is unsafe #2793

Closed zingale closed 4 months ago

zingale commented 4 months ago

flagged by clang-tidy bugprone-unsafe-functions

PR summary

PR motivation

PR checklist

yut23 commented 4 months ago

It looks like we can get rid of the buffer if we use std::put_time(): https://en.cppreference.com/w/cpp/io/manip/put_time#Example

zingale commented 4 months ago

updated