aboutsummaryrefslogtreecommitdiff
path: root/Source/ablastr/utils/text/StreamUtils.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2023-08-01 04:07:07 +0200
committerGravatar GitHub <noreply@github.com> 2023-08-01 02:07:07 +0000
commit862df560823cedaf08b67cbee527ed9bedc79683 (patch)
tree926a8150bd40517abca1a1c5ad9bfaac0349bf1f /Source/ablastr/utils/text/StreamUtils.cpp
parent31199f61b1526f61e64d9ff3122298c08d50b81f (diff)
downloadWarpX-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.cpp17
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');
+}