Hey, i noticed that you recently added the function addElement(Element element, boolean hide) :
However it’s just copy pasta of the old method addElement(Element element) with added
[java]
if (hide)
element.hide();
[/java]
…
So to reduce copy pasta just call the new method in the old method with a default value:
[java] @Override
public void addElement(Element element) {
addElement(element,false);
}
[/java]
No more copy pasta, both methods use the same code, less maintaining
@h1ghst0r3y said:
Hey, i noticed that you recently added the function addElement(Element element, boolean hide) :
However it's just copy pasta of the old method addElement(Element element) with added
[java]
if (hide)
element.hide();
[/java]
…
So to reduce copy pasta just call the new method in the old method with a default value:
[java] @Override
public void addElement(Element element) {
addElement(element,false);
}
[/java]
No more copy pasta, both methods use the same code, less maintaining
Doh! I’ll update this… or have the new method call the prior or something