Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New ClippingTransforms added #1

Merged
merged 5 commits into from
Aug 14, 2015
Merged

New ClippingTransforms added #1

merged 5 commits into from
Aug 14, 2015

Conversation

truizlop
Copy link
Contributor

I have created a couple of additional ClippingTransforms based on your existing ones: SquaresClippingTransform and BitesClippingTransform
Also, I extracted some duplicated code in each of the existing ClippingTransforms into a base class

@truizlop truizlop closed this Aug 13, 2015
@truizlop truizlop reopened this Aug 13, 2015
@JorgeCastilloPrz
Copy link
Owner

First of all, thanks for your help!. I would totally want to merge the PR, but some stuff should be solved before doing that.

  • Travis build should pass properly (checkstyle).
  • I dont feel that hiding some info about ClippingTransforms (to a base class) should be good for users, as this ones are just samples that can be used in production code, but which have been created too in purpose to let devs to read the code a know how to deal with it to create their custom implementations. I would want it to stay the same way it was and not hide any info. The user should see everytime the same contract implementation of the method "transform()" with the 3 arguments that are really self explanatory. Think about Picasso transformations as an example.

And just for the examples that could abstract some info, i think it is pretty much better if we can let it be more explicit even if it means to repeat some code. Dont think about refactoring too much here, but more about readability of the given samples to the user.

@truizlop
Copy link
Contributor Author

Agreed. The build is now passing and I have reverted the refactor to make the code read clearer.

@JorgeCastilloPrz JorgeCastilloPrz merged commit ccb775a into JorgeCastilloPrz:master Aug 14, 2015
JorgeCastilloPrz pushed a commit that referenced this pull request May 13, 2016
JorgeCastilloPrz pushed a commit that referenced this pull request May 13, 2016
Coverity Scan found an error:
```
CID 105392 (#1 of 1): Result is not floating-point
(UNINTENDED_INTEGER_DIVISION)integer_division: Dividing integer
expressions width and 2 * squareSize, and then converting the integer
quotient to type double. Any remainder, or fractional part of the
quotient, is ignored.
```

The solution is simply to cast one of the arguments to double. This
commit does that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants