From 7e788740d38a438cead9949e7585c6245ad4bbe9 Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Fri, 1 Sep 2023 19:25:05 -0400 Subject: [PATCH] Remove non-essential debug call to avoid segfault --- src/colvars_memstream.cpp | 3 --- src/colvars_memstream.h | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/colvars_memstream.cpp b/src/colvars_memstream.cpp index ed5518d9a..2243dc96a 100644 --- a/src/colvars_memstream.cpp +++ b/src/colvars_memstream.cpp @@ -34,9 +34,6 @@ template <> void cvm::memory_stream::write_object(std::string const &t) { size_t const string_length = t.size(); size_t const new_data_size = sizeof(size_t) + sizeof(char) * string_length; - if (cvm::debug()) { - cvm::log("Writing object of type std::string, value = " + cvm::to_str(t)); - } if (expand_ouput_buffer(new_data_size)) { std::memcpy(output_location(), &string_length, sizeof(size_t)); incr_write_pos(sizeof(size_t)); diff --git a/src/colvars_memstream.h b/src/colvars_memstream.h index a856b5b12..9c2b30896 100644 --- a/src/colvars_memstream.h +++ b/src/colvars_memstream.h @@ -161,9 +161,6 @@ class cvm::memory_stream { template void cvm::memory_stream::write_object(T const &t) { - if (cvm::debug()) { - cvm::log("Writing object of type " + std::string(typeid(T).name()) + "\n"); - } static_assert(IS_TRIVIALLY_COPYABLE(T), "Cannot use write_object() on complex type"); size_t const new_data_size = sizeof(T); if (expand_ouput_buffer(new_data_size)) {