Skip to content

Commit

Permalink
Increment version and clean up some things
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMaracine committed Apr 27, 2024
1 parent 6b7bee5 commit 79e4366
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 202 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ that the reference increments and decrements are not atomic. The premise is that
can be very useful in contexts outside of multithreading, in which atomicity is not needed, being just useless
overhead. This is why I tried making my own version of `std::shared_ptr`.

Right now, `shared_ref` doesn't fully conform with the `std::shared_ptr` specification of `C++17`. This is probably
Right now, `shared_ref` doesn't fully conform to the `std::shared_ptr` specification of `C++17`. This is probably
an incomplete list of missing features from my version:

- Not allocator-aware
Expand Down
4 changes: 1 addition & 3 deletions src/cpp_shared_ref/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace sm {
bad_weak_ref(const bad_weak_ref&) noexcept = default;

const char* what() const noexcept override {
return "Shared pointer construction failed, as weak pointer is empty";
return "Shared pointer construction failed, as weak pointer manages no object";
}
};
}
Expand Down Expand Up @@ -74,7 +74,6 @@ namespace sm {
ptr = ref.ptr;
block = ref.block;

// We just created a new strong reference
block.base->strong_count++;
}

Expand Down Expand Up @@ -634,7 +633,6 @@ namespace sm {
ref.ptr = ptr;
ref.block = block;

// We just created a new strong reference
block.base->strong_count++;
}

Expand Down
2 changes: 1 addition & 1 deletion src/cpp_shared_ref/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace sm {
inline constexpr unsigned int VERSION_MAJOR {0u};
inline constexpr unsigned int VERSION_MINOR {2u};
inline constexpr unsigned int VERSION_MINOR {3u};
inline constexpr unsigned int VERSION_PATCH {0u};
}
65 changes: 0 additions & 65 deletions tests/perf/memory/saved/massif_shared_ptr.txt

This file was deleted.

60 changes: 0 additions & 60 deletions tests/perf/memory/saved/massif_shared_ref.txt

This file was deleted.

68 changes: 0 additions & 68 deletions tests/perf/memory/saved/massif_shared_ref_old.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/perf/speed/saved/asus_shared_ptr.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/perf/speed/saved/asus_shared_ref.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/perf/speed/saved/lenovo_shared_ptr.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/perf/speed/saved/lenovo_shared_ref.txt

This file was deleted.

0 comments on commit 79e4366

Please sign in to comment.