both sides of std::max must have the same type -- try

    (size_t)std::max(0LL, GetArg("-maxorphanblocks", DEFAULT_MAX_ORPHAN_BLOCKS)))