Due to C++'s ability to overload functions, if
d1s->getX()+1 and
d1s->getY() +1
are types convertable to ints, the compiler should know to call the two parameter function with type ints.