cmake: revert to C++14

I've modified some of the code so our C++ version can decrease back to C++14. If this fixes the OTIO linker issue... well that sucks. Hopefully whatever the issue is gets resolved some time so that we can upgrade to C++17
This commit is contained in:
itsmattkc
2022-03-28 00:40:19 -07:00
parent 16580841a6
commit 518f57992e
4 changed files with 21 additions and 6 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ option(BUILD_DOXYGEN "Build Doxygen documentation" OFF)
option(BUILD_TESTS "Build unit tests" ON)
option(USE_WERROR "Error on compile warning" ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
+13 -5
View File
@@ -152,6 +152,18 @@ void PolygonGenerator::GenerateFrame(FramePtr frame, const GenerateJob &job) con
}
}
template<typename T>
NodeGizmo *PolygonGenerator::CreateAppropriateGizmo()
{
return new T(this);
}
template<>
NodeGizmo *PolygonGenerator::CreateAppropriateGizmo<PointGizmo>()
{
return AddDraggableGizmo<PointGizmo>();
}
template<typename T>
void PolygonGenerator::ValidateGizmoVectorSize(QVector<T*> &vec, int new_sz)
{
@@ -168,11 +180,7 @@ void PolygonGenerator::ValidateGizmoVectorSize(QVector<T*> &vec, int new_sz)
if (old_sz < new_sz) {
for (int i=old_sz; i<new_sz; i++) {
if constexpr(std::is_same_v<T, PointGizmo>) {
vec[i] = AddDraggableGizmo<T>();
} else {
vec[i] = new T(this);
}
vec[i] = static_cast<T*>(CreateAppropriateGizmo<T>());
}
}
}
+3
View File
@@ -69,6 +69,9 @@ private:
template<typename T>
void ValidateGizmoVectorSize(QVector<T*> &vec, int new_sz);
template<typename T>
NodeGizmo *CreateAppropriateGizmo();
PathGizmo *poly_gizmo_;
QVector<PointGizmo*> gizmo_position_handles_;
QVector<PointGizmo*> gizmo_bezier_handles_;
@@ -557,6 +557,10 @@ void PointerTool::FinishDrag(TimelineViewMouseEvent *event)
ghost->GetAdjustedLength(),
ghost->GetMode());
if (event->GetModifiers() & Qt::ControlModifier) {
}
c->SetTrimIsARollEdit(ghost->GetData(TimelineViewGhostItem::kTrimIsARollEdit).toBool());
command->add_child(c);