fixes, name refactoring

This commit is contained in:
ProgramSnail 2024-01-04 19:29:29 +03:00
parent 4f04dd9995
commit fe652bc1c2
11 changed files with 62 additions and 27 deletions

View file

@ -56,8 +56,8 @@ FunctionDefinition::combine(FunctionDefinition &&other_function_definition) {
other_function_definition.docs_.get_description().has_value()) {
return CombineResult::MORE_THEN_ONE_DOCS_ERROR;
}
if (docs_.get_annotations_info_size() > 0 &&
other_function_definition.docs_.get_annotations_info_size() > 0) {
if (docs_.annotations_info_size() > 0 &&
other_function_definition.docs_.annotations_info_size() > 0) {
return CombineResult::MORE_THEN_ONE_DOCS_ERROR;
}
@ -137,8 +137,8 @@ FunctionDefinition::combine(FunctionDefinition &&other_function_definition) {
// combine docs
// all docs should be in one definition
if (other_function_definition.docs_.get_description().has_value() ||
other_function_definition.docs_.get_annotations_info_size() > 0) {
if (docs_.get_annotations_info_size() > 0 ||
other_function_definition.docs_.annotations_info_size() > 0) {
if (docs_.annotations_info_size() > 0 ||
docs_.get_description().has_value()) {
return CombineResult::MORE_THEN_ONE_DOCS_ERROR;
}
@ -221,8 +221,8 @@ CombineResult TypeDefinition::combine(TypeDefinition &&other_type_definition) {
other_type_definition.docs_.get_description().has_value()) {
return CombineResult::MORE_THEN_ONE_DOCS_ERROR;
}
if (docs_.get_annotations_info_size() > 0 &&
other_type_definition.docs_.get_annotations_info_size() > 0) {
if (docs_.annotations_info_size() > 0 &&
other_type_definition.docs_.annotations_info_size() > 0) {
return CombineResult::MORE_THEN_ONE_DOCS_ERROR;
}
@ -234,8 +234,8 @@ CombineResult TypeDefinition::combine(TypeDefinition &&other_type_definition) {
// combine docs
// all docs should be in one definition
if (other_type_definition.docs_.get_description().has_value() ||
other_type_definition.docs_.get_annotations_info_size() > 0) {
if (docs_.get_annotations_info_size() > 0 ||
other_type_definition.docs_.annotations_info_size() > 0) {
if (docs_.annotations_info_size() > 0 ||
docs_.get_description().has_value()) {
return CombineResult::MORE_THEN_ONE_DOCS_ERROR;
}