diff options
author | 2023-08-01 04:07:07 +0200 | |
---|---|---|
committer | 2023-08-01 02:07:07 +0000 | |
commit | 862df560823cedaf08b67cbee527ed9bedc79683 (patch) | |
tree | 926a8150bd40517abca1a1c5ad9bfaac0349bf1f /Source/ablastr/utils/text/StreamUtils.cpp | |
parent | 31199f61b1526f61e64d9ff3122298c08d50b81f (diff) | |
download | WarpX-862df560823cedaf08b67cbee527ed9bedc79683.tar.gz WarpX-862df560823cedaf08b67cbee527ed9bedc79683.tar.zst WarpX-862df560823cedaf08b67cbee527ed9bedc79683.zip |
Move GotoNextLine helper function into ablastr (#4139)
* move GotoNextLine helper function into ablastr
* fixed bug
* Update Source/ablastr/utils/text/StreamUtils.H
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/ablastr/utils/text/StreamUtils.cpp')
-rw-r--r-- | Source/ablastr/utils/text/StreamUtils.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/ablastr/utils/text/StreamUtils.cpp b/Source/ablastr/utils/text/StreamUtils.cpp new file mode 100644 index 000000000..965beb179 --- /dev/null +++ b/Source/ablastr/utils/text/StreamUtils.cpp @@ -0,0 +1,17 @@ +/* Copyright 2023 + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ + +#include "StreamUtils.H" + +#include <ios> +#include <limits> + +void +ablastr::utils::text::goto_next_line (std::istream& is) +{ + is.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); +} |