-
Notifications
You must be signed in to change notification settings - Fork 115
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
Remove static_cast from LruGc API, and others #1324
base: wuandy/LruGC
Are you sure you want to change the base?
Conversation
@@ -108,15 +108,10 @@ struct AlignedStorage { | |||
#define FIREBASE_DEPRECATED | |||
#endif // defined(SWIG) || defined(DOXYGEN) | |||
|
|||
// TODO: Replace all usages of the FIREBASE_DEPRECATED macro with the C++14 |
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.
Missing username in TODO; it should look like "// TODO(my_username): Stuff."
return out; | ||
} | ||
|
||
std::string ToString() const { return (std::ostringstream() << *this).str(); } |
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.
Add #include <string> for string
: impl_(std::make_shared<Impl>()) {} | ||
|
||
LocalCacheSettings::MemoryCacheSettings::LruGCSettings::LruGCSettings(Impl impl) | ||
: impl_(std::make_shared<Impl>(std::move(impl))) {} |
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.
Add #include <utility> for move
} | ||
|
||
Impl WithCacheSettings(PersistentCacheSettings::Impl settings) const { | ||
return Impl(std::move(settings)); |
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.
Add #include <utility> for move
return out; | ||
} | ||
|
||
std::string ToString() const { return (std::ostringstream() << *this).str(); } |
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.
Add #include <string> for string
* supported by the SDK. Custom implementation is not supported. | ||
*/ | ||
class LocalCacheSettings { | ||
class LocalCacheSettings final { |
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.
📝 Documentation issue: warning: Compound firebase::firestore::LocalCacheSettings is not documented.
friend bool operator==(const LocalCacheSettings& lhs, | ||
const LocalCacheSettings& rhs); | ||
LocalCacheSettings(); | ||
explicit LocalCacheSettings(PersistentCacheSettings); |
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.
📝 Documentation issue: warning: Member LocalCacheSettings(PersistentCacheSettings) (function) of class firebase::firestore::LocalCacheSettings is not documented.
const LocalCacheSettings& rhs); | ||
LocalCacheSettings(); | ||
explicit LocalCacheSettings(PersistentCacheSettings); | ||
explicit LocalCacheSettings(MemoryCacheSettings); |
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.
📝 Documentation issue: warning: Member LocalCacheSettings(MemoryCacheSettings) (function) of class firebase::firestore::LocalCacheSettings is not documented.
explicit LocalCacheSettings(PersistentCacheSettings); | ||
explicit LocalCacheSettings(MemoryCacheSettings); | ||
|
||
LocalCacheSettings(const LocalCacheSettings&) = 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.
📝 Documentation issue: warning: Member LocalCacheSettings(const LocalCacheSettings &)=default (function) of class firebase::firestore::LocalCacheSettings is not documented.
explicit LocalCacheSettings(MemoryCacheSettings); | ||
|
||
LocalCacheSettings(const LocalCacheSettings&) = default; | ||
LocalCacheSettings& operator=(const LocalCacheSettings&) = 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.
📝 Documentation issue: warning: Member operator=(const LocalCacheSettings &)=default (function) of class firebase::firestore::LocalCacheSettings is not documented.
PersistentCacheSettings(const PersistentCacheSettings&) = default; | ||
PersistentCacheSettings& operator=(const PersistentCacheSettings&) = default; | ||
PersistentCacheSettings(PersistentCacheSettings&&) = default; | ||
PersistentCacheSettings& operator=(PersistentCacheSettings&&) = 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.
📝 Documentation issue: warning: Member operator=(PersistentCacheSettings &&)=default (function) of class firebase::firestore::LocalCacheSettings::PersistentCacheSettings is not documented.
|
||
/** Move assignment. */ | ||
PersistentCacheSettings& operator=(PersistentCacheSettings&& other) = default; | ||
void PrintTo(std::ostream& out) const; |
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.
📝 Documentation issue: warning: Member PrintTo(std::ostream &out) const (function) of class firebase::firestore::LocalCacheSettings::PersistentCacheSettings is not documented.
/** Equality function. */ | ||
friend bool operator==(const PersistentCacheSettings& lhs, | ||
const PersistentCacheSettings& rhs); | ||
std::string ToString() const { return (std::ostringstream() << *this).str(); } |
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.
📝 Documentation issue: warning: Member ToString() const (function) of class firebase::firestore::LocalCacheSettings::PersistentCacheSettings is not documented.
|
||
~PersistentCacheSettings() override; | ||
friend std::ostream& operator<<(std::ostream& out, |
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.
📝 Documentation issue: warning: Member operator<<(std::ostream &out, const PersistentCacheSettings &self) (friend) of class firebase::firestore::LocalCacheSettings::PersistentCacheSettings is not documented.
@@ -142,7 +142,7 @@ class Settings final { | |||
* Returns a shared pointer to the `LocalCacheSettings` instance | |||
* used to configure this SDK. | |||
*/ | |||
std::shared_ptr<LocalCacheSettings> local_cache_settings(); | |||
LocalCacheSettings local_cache_settings() const; | |||
|
|||
/** | |||
* Configures the SDK with the given `LocalCacheSettings` instance. |
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.
📝 Documentation issue: [1 line down] warning: argument 'cache_settings' of command @param is not found in the argument list of firebase::firestore::Settings::set_local_cache_settings(LocalCacheSettings)
No description provided.