-
Notifications
You must be signed in to change notification settings - Fork 371
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
TimeRef is not a singleton anymore. #2396
TimeRef is not a singleton anymore. #2396
Conversation
2ccebbd
to
05630ac
Compare
Note: I moved the |
#include <chrono> | ||
#include <string> | ||
|
||
namespace validate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we scope that with mamba::
? I've started following that convention with mamba::solv
, mamba::util
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on scoping inner namespaces with mamba::
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the namespace that is originally in validate.hpp/cpp
😬
If that's ok with yall I'll change it to mamba::validate
in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See: #2411
#include <chrono> | ||
#include <string> | ||
|
||
namespace validate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on scoping inner namespaces with mamba::
libmamba/src/core/timeref.cpp
Outdated
{ | ||
} | ||
|
||
TimeRef::~TimeRef() = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can rely on destructor automatic generation and remove this line and its declaration in the header.
@@ -711,11 +711,11 @@ namespace validate | |||
RootImpl root(root1_json); | |||
|
|||
// expiration is set to now+3600s in 'sign_root' | |||
TimeRef::instance().set(utc_time_now()); | |||
EXPECT_FALSE(root.expired()); | |||
auto time_ref = TimeRef{ utc_time_now() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking: TimeRef time_ref;
05630ac
to
7606275
Compare
No description provided.