Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b4c1d72

Browse files
committed
Refactoring: Use just one return to improve readability
1 parent 3c547ec commit b4c1d72

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

source/core/ut_suite_builder.pkb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -754,17 +754,14 @@ create or replace package body ut_suite_builder is
754754
a_context_ann_pos t_annotation_position,
755755
a_package_annotations in out nocopy tt_annotations_by_name
756756
) return boolean is
757-
l_next_endcontext_pos t_annotation_position;
758-
l_next_context_pos t_annotation_position;
757+
l_next_endcontext_pos t_annotation_position := 0;
758+
l_next_context_pos t_annotation_position := 0;
759759
begin
760760
if ( a_package_annotations.exists(gc_endcontext) and a_package_annotations.exists(gc_context)) then
761761
l_next_endcontext_pos := get_next_annotation_of_type(a_context_ann_pos, gc_endcontext, a_package_annotations);
762762
l_next_context_pos := a_package_annotations(gc_context).next(a_context_ann_pos);
763-
if ( l_next_context_pos < l_next_endcontext_pos ) then
764-
return true;
765-
end if;
766763
end if;
767-
return false;
764+
return ( l_next_context_pos < l_next_endcontext_pos );
768765
end;
769766

770767
function get_annotations_in_context(

0 commit comments

Comments
 (0)