Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
tang-hi committed Jan 19, 2025
1 parent 215580e commit e4b6c5c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions parallel_hashmap/phmap_dump.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <functional>
#if !defined(phmap_dump_h_guard_)
#define phmap_dump_h_guard_

Expand All @@ -22,7 +21,7 @@

#include <iostream>
#include <fstream>
#include <sstream>
#include <functional>
#include "phmap.h"
namespace phmap
{
Expand Down Expand Up @@ -169,8 +168,10 @@ bool parallel_hash_set<N, RefSet, Mtx_, Policy, Hash, Eq, Alloc>::phmap_load(Inp
class BinaryOutputArchive {
public:
BinaryOutputArchive(const char *file_path) {
os_ = new std::ofstream(file_path, std::ofstream::out | std::ofstream::trunc | std::ofstream::binary);
destruct_ = [this]() { delete os_; };
os_ = new std::ofstream(file_path, std::ofstream::out |
std::ofstream::trunc |
std::ofstream::binary);
destruct_ = [this]() { delete os_; };
}

BinaryOutputArchive(std::ostream &os) : os_(&os) {}
Expand Down Expand Up @@ -203,7 +204,7 @@ class BinaryOutputArchive {
}

private:
std::ostream* os_{nullptr};
std::ostream* os_;
std::function<void()> destruct_;
};

Expand Down Expand Up @@ -246,7 +247,7 @@ class BinaryInputArchive {
}

private:
std::istream* is_{nullptr};
std::istream* is_;
std::function<void()> destruct_;
};

Expand Down

0 comments on commit e4b6c5c

Please sign in to comment.