Change qSort to std::sort