MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / can_default_init

Function can_default_init

utils/dasFormatter/formatter.cpp:162–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 }
161
162 bool can_default_init(const string &name) {
163 auto maybe_struct = try_find_struct(name);
164 if (!maybe_struct) {
165 return false;
166 } else {
167 const auto &fields = (*maybe_struct)->fields;
168 return all_of(fields.begin(), fields.end(), [](auto field) {
169 return field.init;
170 });
171 }
172 }
173
174 CanInit can_init_with(const string &name, uint32_t arg_cnt) {
175 return CanInit::Can;

Callers 2

yyparseFunction · 0.85
can_init_withFunction · 0.85

Calls 3

try_find_structFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected