Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool CheckProto(TConfig& config) {
- const auto& descriptor = *config.GetDescriptor();
- const auto& reflection = *config.GetReflection();
- for (int i = 0; i < descriptor.field_count(); ++i){
- const auto& field = *descriptor.field(i);
- if (field.is_required()) {
- const bool key = field.options.GetExtension(NAlice::Required);
- if (!key)
- return false;
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement