Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenable move semantics and suppress warnings #520

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

mellis13
Copy link
Collaborator

This PR makes two small changes to the SmartRedis code:

  1. The std::random_device instance is not stored as a member variable on the RedisServer class. The std::random_device is not movable or copyable, and as a result, it was implicitly disabling move semantics for the Client and the RedisServer derivates.
  2. Exception class methods have been marked with the appropriate const override keywords to suppress compiler warnings.

in SRException class.  Also, fix const correctness for
exception_class method overrides.
redisserver so that move semantics are reenabled.
@mellis13 mellis13 added the area: C++ Issues related to the C++ client label Oct 30, 2024
@mellis13 mellis13 requested review from ashao and al-rigazzi October 30, 2024 22:10
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.

Project coverage is 57.62%. Comparing base (4937fbd) to head (589072e).
Report is 15 commits behind head on develop.

Files with missing lines Patch % Lines
include/srexception.h 12.50% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           develop     #520       +/-   ##
============================================
- Coverage    95.92%   57.62%   -38.31%     
============================================
  Files           10      147      +137     
  Lines          884    11708    +10824     
  Branches         0     1127     +1127     
============================================
+ Hits           848     6747     +5899     
- Misses          36     4810     +4774     
- Partials         0      151      +151     
Files with missing lines Coverage Δ
include/redisserver.h 60.00% <ø> (ø)
src/cpp/redisserver.cpp 98.96% <100.00%> (ø)
include/srexception.h 49.18% <12.50%> (ø)

... and 134 files with indirect coverage changes

Copy link
Collaborator

@al-rigazzi al-rigazzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this fix!

Copy link
Collaborator

@ashao ashao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for polishing this

@mellis13 mellis13 merged commit 4ecc210 into CrayLabs:develop Oct 30, 2024
40 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: C++ Issues related to the C++ client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants