Skip to content

Commit

Permalink
Simplify Add in OppositeCategory
Browse files Browse the repository at this point in the history
  • Loading branch information
zickgraf committed Sep 11, 2024
1 parent 8cd8299 commit d44e0ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CAP/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "CAP",
Subtitle := "Categories, Algorithms, Programming",
Version := "2024.09-08",
Version := "2024.09-09",
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",

Expand Down
6 changes: 2 additions & 4 deletions CAP/gap/OppositeCategory.gi
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",
current_recname, current_entry, dual_operation_name, filter_list, input_arguments_names, return_type, func_string,
preprocessor_string, dual_arguments, tmp,
postprocessor_string, output_source_getter_string, output_range_getter_string, return_statement,
func, weight, current_add, list_of_attributes, attr, tester, setter;
func, weight, list_of_attributes, attr, tester, setter;

## Take care of attributes
## TODO: if there are more instances, set markers in the MethodRecord
Expand Down Expand Up @@ -373,9 +373,7 @@ BindGlobal( "CAP_INTERNAL_INSTALL_OPPOSITE_ADDS_FROM_CATEGORY",

Assert( 0, weight < infinity );

current_add := ValueGlobal( Concatenation( "Add", current_recname ) );

current_add( opposite_category, func, weight );
AddCapOperation( current_recname, opposite_category, func, weight );

od;

Expand Down

0 comments on commit d44e0ca

Please sign in to comment.