Skip to content
Snippets Groups Projects
Commit 17a985a1 authored by Leonard Kupper's avatar Leonard Kupper
Browse files

Get minor fixes from remote.

parents b3c96ef5 d7563019
No related branches found
No related tags found
1 merge request!8Feat/rasterizer 10
...@@ -28,8 +28,8 @@ public class FunctionalRasterizer<T extends Renderable> implements Rasterizer { ...@@ -28,8 +28,8 @@ public class FunctionalRasterizer<T extends Renderable> implements Rasterizer {
@Override @Override
public void rasterize(final Renderable data, final RasterCanvas canvas) throws InsufficientRenderingAreaException { public void rasterize(final Renderable data, final RasterCanvas canvas) throws InsufficientRenderingAreaException {
// invoke the given rasterizing algorithm // invoke the given rasterizing algorithm
T diagram = safeCast(data); T safeData = safeCast(data);
mRasterizingAlgorithm.accept(diagram, canvas); mRasterizingAlgorithm.accept(safeData, canvas);
} }
final Class<? extends T> getSupportedRenderableClass() { final Class<? extends T> getSupportedRenderableClass() {
...@@ -37,7 +37,7 @@ public class FunctionalRasterizer<T extends Renderable> implements Rasterizer { ...@@ -37,7 +37,7 @@ public class FunctionalRasterizer<T extends Renderable> implements Rasterizer {
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
// This is allowed, because the code that calls the rasterize method does a lookup based on the diagram class beforehand // This is allowed, because the code that calls the rasterize method does a lookup based on the renderable class beforehand
// and will only select the appropriate rasterizer. (See FunctionalRenderingBase) // and will only select the appropriate rasterizer. (See FunctionalRenderingBase)
// Since the FunctionalRasterizer is package private, there is no way to invoke it with the wrong type from 'outside'. // Since the FunctionalRasterizer is package private, there is no way to invoke it with the wrong type from 'outside'.
// Should somebody still force this to happen by intentional tampering, we have no choice but to catch this disgrace. // Should somebody still force this to happen by intentional tampering, we have no choice but to catch this disgrace.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment