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

use frozen #347

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

use frozen #347

wants to merge 1 commit into from

Conversation

clr-li
Copy link

@clr-li clr-li commented Jan 14, 2025

No description provided.

@clr-li clr-li requested a review from huttongrabiel January 14, 2025 02:29
@huttongrabiel
Copy link
Contributor

@clr-li It looks like this isn't building. Can you figure out why, fix, and then update this PR? It looks like frozen isn't being used correctly.

@@ -11,12 +12,12 @@ bool validateKey(const json& j, const std::string& key, const val_t& type) {
}

bool validateKey(const json& j, const std::string& key,
const std::unordered_set<val_t>& types) {
const frozen::unordered_set<val_t>& types) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this isn't quite the right usage. It seems like it wants a size being specified to it so maybe frozen is not the right use case here. Can you take a look into if that is correct that it wants a capacity?

return hasKey(j, key) && types.find(j.at(key).type()) != types.end();
}

bool validateOneOf(const json& j, const std::string& key,
const std::unordered_set<std::string>& vals) {
const frozen::unordered_set<std::string>& vals) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants