Skip to content

Commit

Permalink
Remove non-essential debug call to avoid segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin committed Sep 5, 2023
1 parent 5a254a2 commit 7e78874
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/colvars_memstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 0 additions & 3 deletions src/colvars_memstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ class cvm::memory_stream {

template <typename T> 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)) {
Expand Down

0 comments on commit 7e78874

Please sign in to comment.