Skip to content

Add rule to use #min: and #max: instead of comparisons #67

Open

Description

@jecisc
No description provided.

Activity

  1. added this to the v1.1.x milestone on May 3, 2020
  2. jecisc commented on May 3, 2020

    @jecisc
    OwnerAuthor
    	replace: '``@a < ``@b ifTrue: [``@a] ifFalse: [``@b]' with: '``@a min: ``@b';
    	replace: '``@a <= ``@b ifTrue: [``@a] ifFalse: [``@b]' with: '``@a min: ``@b';
    	replace: '``@a > ``@b ifTrue: [``@a] ifFalse: [``@b]' with: '``@a max: ``@b';
    	replace: '``@a >= ``@b ifTrue: [``@a] ifFalse: [``@b]' with: '``@a max: ``@b';
    	replace: '``@a < ``@b ifTrue: [``@b] ifFalse: [``@a]' with: '``@a max: ``@b';
    	replace: '``@a <= ``@b ifTrue: [``@b] ifFalse: [``@a]' with: '``@a max: ``@b';
    	replace: '``@a > ``@b ifTrue: [``@b] ifFalse: [``@a]' with: '``@a min: ``@b';
    	replace:  '``@a >= ``@b ifTrue: [``@b] ifFalse: [``@a]' with: '``@a min: ``@b';
    	replace: '`a < ``@b ifTrue: [`a := ``@b]' with: '`a := `a max: ``@b';
    	replace: '`a <= ``@b ifTrue: [`a := ``@b]' with: '`a := `a max: ``@b';
    	replace: '`a < ``@b ifFalse: [`a := ``@b]' with: '`a := `a min: ``@b';
    	replace: '`a <= ``@b ifFalse: [`a := ``@b]' with: '`a := `a min: ``@b';
    	replace: '`a > ``@b ifTrue: [`a := ``@b]' with: '`a := `a min: ``@b';
    	replace: '`a >= ``@b ifTrue: [`a := ``@b]' with: '`a := `a min: ``@b';
    	replace: '`a > ``@b ifFalse: [`a := ``@b]' with: '`a := `a max: ``@b';
    	replace: '`a >= ``@b ifFalse: [`a := ``@b]' with: '`a := `a max: ``@b';
    	replace: '``@b < `a ifTrue: [`a := ``@b]' with: '`a := `a min: ``@b';
    	replace: '``@b <= `a ifTrue: [`a := ``@b]' with: '`a := `a min: ``@b';
    	replace: '``@b < `a ifFalse: [`a := ``@b]' with: '`a := `a max: ``@b';
    	replace: '``@b <= `a ifFalse: [`a := ``@b]' with: '`a := `a max: ``@b';
    	replace: '``@b > `a ifTrue: [`a := ``@b]' with: '`a := `a max: ``@b';
    	replace: '``@b >= `a ifTrue: [`a := ``@b]' with: '`a := `a max: ``@b';
    	replace: '``@b > `a ifFalse: [`a := ``@b]' with: '`a := `a min: ``@b';
    	replace: '``@b >= `a ifFalse: [`a := ``@b]' with: '`a := `a min: ``@b'
  3. jecisc commented on May 3, 2020

    @jecisc
    OwnerAuthor

    Maybe add also a new cleaner after doing the #min:max: one.

  4. modified the milestones: v1.1.x, v1.x.x on May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions