-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2023. 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 "smpi_comm.hpp"
#include "simgrid/Exception.hpp"
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
Info::Info(const Info* orig)
{
int Info::get(const char* key, int valuelen, char* value, int* flag) const
{
*flag=false;
- auto val = map_.find(key);
- if (val != map_.end()) {
+ if (auto val = map_.find(key); val != map_.end()) {
std::string tmpvalue = val->second;
memset(value, 0, valuelen);
int Info::get_valuelen(const char* key, int* valuelen, int* flag) const
{
*flag=false;
- auto val = map_.find(key);
- if (val != map_.end()) {
+ if (auto val = map_.find(key); val != map_.end()) {
*valuelen = val->second.length();
*flag=true;
}
return static_cast<Info*>(F2C::f2c(id));
}
-}
-}
+} // namespace simgrid::smpi