Make use of std::stoi instead of giving an own implementation.