X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fe304706848f0a64477d4687b3ea97d5b9a0c35c..ef1af4e53dff6d26dcfabafed5e78b461866071f:/src/mc/mc_hash.cpp diff --git a/src/mc/mc_hash.cpp b/src/mc/mc_hash.cpp index 8c23131509..8b667d00e2 100644 --- a/src/mc/mc_hash.cpp +++ b/src/mc/mc_hash.cpp @@ -1,10 +1,9 @@ -/* Copyright (c) 2014-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-2022. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include - #include #include "xbt/log.h" @@ -12,13 +11,12 @@ #include "mc/datatypes.h" #include "src/mc/mc_hash.hpp" #include "src/mc/mc_private.hpp" -#include "src/mc/sosp/mc_snapshot.hpp" +#include "src/mc/sosp/Snapshot.hpp" #include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_hash, mc, "Logging specific to mc_hash"); -namespace simgrid { -namespace mc { +namespace simgrid::mc { namespace { @@ -31,17 +29,14 @@ public: { state_ = (state_ << 5) + state_ + x; } - hash_type value() - { - return state_; - } + hash_type value() const { return state_; } }; } hash_type hash(Snapshot const& snapshot) { - XBT_DEBUG("START hash %i", snapshot.num_state_); + XBT_DEBUG("START hash %ld", snapshot.num_state_); djb_hash hash; // TODO: // * nb_processes @@ -49,9 +44,8 @@ hash_type hash(Snapshot const& snapshot) // * root variables // * basic stack frame information // * stack frame local variables - XBT_DEBUG("END hash %i", snapshot.num_state_); + XBT_DEBUG("END hash %ld", snapshot.num_state_); return hash.value(); } -} -} +} // namespace simgrid::mc