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

Function can_init_with

utils/dasFormatter/formatter.cpp:174–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172 }
173
174 CanInit can_init_with(const string &name, uint32_t arg_cnt) {
175 return CanInit::Can;
176 // Possible uninitialized
177 if (arg_cnt == 0) {
178 if (can_default_init(name)) {
179 return CanInit::Can;
180 } else {
181 return CanInit::Cannot;
182 }
183 }
184 auto maybe_struct = try_find_struct(name);
185 if (!maybe_struct) {
186 return CanInit::Unknown;
187 }
188 return (*maybe_struct)->fields.size() == arg_cnt ? CanInit::Can : CanInit::Unknown;
189 }
190
191 bool is_else_newline() {
192 return state.options.contains(FormatOpt::ElseNewLine);

Callers 1

handle_msdFunction · 0.85

Calls 3

can_default_initFunction · 0.85
try_find_structFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected