Replace deprecated Qt code with STL

This commit is contained in:
Dale Glass 2022-06-05 13:00:36 +02:00
parent 6bd9de5d41
commit a43b9e170a
2 changed files with 3 additions and 2 deletions

View file

@ -115,7 +115,7 @@ bool Bookmarks::sortOrder(QAction* a, QAction* b) {
void Bookmarks::sortActions(Menu* menubar, MenuWrapper* menu) {
QList<QAction*> actions = menu->actions();
qSort(actions.begin(), actions.end(), sortOrder);
std::sort(actions.begin(), actions.end(), sortOrder);
for (QAction* action : menu->actions()) {
menu->removeAction(action);
}

View file

@ -17,6 +17,7 @@
#include <DependencyManager.h>
#include <GeometryUtil.h>
#include <Rig.h>
#include <algorithm>
#include "Logging.h"
#include "Avatar.h"
@ -29,7 +30,7 @@ static void updateFakeCoefficients(float leftBlink, float rightBlink, float brow
float jawOpen, float mouth2, float mouth3, float mouth4, QVector<float>& coefficients) {
coefficients.resize(std::max((int)coefficients.size(), (int)Blendshapes::BlendshapeCount));
qFill(coefficients.begin(), coefficients.end(), 0.0f);
std::fill(coefficients.begin(), coefficients.end(), 0.0f);
coefficients[(int)Blendshapes::EyeBlink_L] = leftBlink;
coefficients[(int)Blendshapes::EyeBlink_R] = rightBlink;
coefficients[(int)Blendshapes::BrowsU_C] = browUp;