MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / AddReject

Method AddReject

source/fbe.cpp:76–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void StructRejects::AddReject(std::string* r, bool g)
77{
78 if (r == nullptr)
79 yyerror("Reject is null!");
80 if (r->empty())
81 yyerror("Reject is invalid!");
82
83 // Check for duplicates
84 auto it = std::find_if(rejects.begin(), rejects.end(), [r](auto item)->bool { return *item.reject.get() == *r; });
85 if (it != rejects.end())
86 yyerror("Duplicate reject " + *r);
87
88 rejects.push_back({ std::shared_ptr<std::string>(r), g });
89}
90
91int StructType::stype = 0;
92

Callers

nothing calls this directly

Calls 5

beginMethod · 0.80
endMethod · 0.80
push_backMethod · 0.80
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected