I've never used the book myself, but by the looks of
code listing here, the function just does a simple conversion from a
Aircraft::Type to
Textures::ID. This is just fine, as it makes it possible to do the one-line constructor for
mSprite.
When people say that globals are evil, they are referring to global objects, not functions. These cause problems as the order of initialization is not specified, and so heavy-weight objects, such as
sf::Window, can cause the program to crash. They also indicate a design flaw, as potentially any part of the program can modify the variable. Both of these obviously do not apply in this case.