From bb32da12f1b1486da14869a8893146079290f8ac Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 30 Sep 2013 10:30:18 -0700 Subject: [PATCH] complete removal of fervor and C++11 array --- CMakeLists.txt | 17 ----------------- domain-server/src/DomainServer.cpp | 16 ++++++++-------- domain-server/src/DomainServer.h | 3 +-- interface/CMakeLists.txt | 1 - interface/src/Application.cpp | 5 ----- interface/src/Menu.cpp | 21 +-------------------- interface/src/Menu.h | 2 -- 7 files changed, 10 insertions(+), 55 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8628576e2d..4e464e9eca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,23 +12,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) -# Initialize CXXFLAGS. -set(CMAKE_CXX_FLAGS "-std=c++11") - -# Compiler-specific C++11 activation. -if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") - execute_process( - COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)) - message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.") - endif () -elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") -else () - message(FATAL_ERROR "Your C++ compiler does not support C++11.") -endif () - add_subdirectory(animation-server) add_subdirectory(assignment-client) add_subdirectory(domain-server) diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index 199d6721da..9169d77e54 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -139,7 +139,7 @@ void DomainServer::prepopulateStaticAssignmentFile() { // write a fresh static assignment array to file - std::array freshStaticAssignments; + Assignment freshStaticAssignments[NUM_FRESH_STATIC_ASSIGNMENTS]; // pre-populate the first static assignment list with assignments for root AuM, AvM, VS freshStaticAssignments[0] = Assignment(Assignment::CreateCommand, @@ -177,9 +177,9 @@ int DomainServer::checkInMatchesStaticAssignment(NODE_TYPE nodeType, const uchar NUM_BYTES_RFC4122_UUID)); int staticAssignmentIndex = 0; - while (staticAssignmentIndex < _staticFileAssignments->size() - 1 - && !(*_staticFileAssignments)[staticAssignmentIndex].getUUID().isNull()) { - Assignment* staticAssignment = &(*_staticFileAssignments)[staticAssignmentIndex]; + while (staticAssignmentIndex < MAX_STATIC_ASSIGNMENT_FILE_ASSIGNMENTS + && !_staticFileAssignments[staticAssignmentIndex].getUUID().isNull()) { + Assignment* staticAssignment = &_staticFileAssignments[staticAssignmentIndex]; if (staticAssignment->getType() == Assignment::typeForNodeType(nodeType) && staticAssignment->getUUID() == checkInUUID) { @@ -279,7 +279,7 @@ int DomainServer::run() { _staticAssignmentFileData = _staticAssignmentFile.map(0, _staticAssignmentFile.size()); _numAssignmentsInStaticFile = (uint16_t*) _staticAssignmentFileData; - _staticFileAssignments = (std::array*) + _staticFileAssignments = (Assignment*) (_staticAssignmentFileData + sizeof(*_numAssignmentsInStaticFile)); while (true) { @@ -397,9 +397,9 @@ int DomainServer::run() { _assignmentQueueMutex.unlock(); // find the first available spot in the static assignments and put this assignment there - for (int i = 0; i < _staticFileAssignments->size() - 1; i++) { - if ((*_staticFileAssignments)[i].getUUID().isNull()) { - (*_staticFileAssignments)[i] = *createAssignment; + for (int i = 0; i < MAX_STATIC_ASSIGNMENT_FILE_ASSIGNMENTS; i++) { + if (_staticFileAssignments[i].getUUID().isNull()) { + _staticFileAssignments[i] = *createAssignment; } } } diff --git a/domain-server/src/DomainServer.h b/domain-server/src/DomainServer.h index 9f5ba3fdac..3cec6d8005 100644 --- a/domain-server/src/DomainServer.h +++ b/domain-server/src/DomainServer.h @@ -9,7 +9,6 @@ #ifndef __hifi__DomainServer__ #define __hifi__DomainServer__ -#include #include #include @@ -58,7 +57,7 @@ private: uchar* _staticAssignmentFileData; uint16_t* _numAssignmentsInStaticFile; - std::array* _staticFileAssignments; + Assignment* _staticFileAssignments; const char* _voxelServerConfig; }; diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index f1f3aa2d3d..7b02472778 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -137,7 +137,6 @@ target_link_libraries( ${MOTIONDRIVER_LIBRARIES} ${OPENCV_LIBRARIES} ${ZLIB_LIBRARIES} - fervor ) if (APPLE) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index ed1e513b91..46bacd4349 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -320,11 +320,6 @@ void Application::initializeGL() { // update before the first render update(0.0f); - // now that things are drawn - if this is an OS X release build we can check for an update -#if defined(Q_OS_MAC) && defined(QT_NO_DEBUG) - Menu::getInstance()->checkForUpdates(); -#endif - InfoView::showFirstTime(); } diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index a9607ee49e..fee10e6459 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -21,7 +21,6 @@ #include #include "Application.h" -#include "fvupdater.h" #include "PairingHandler.h" #include "Menu.h" #include "Util.h" @@ -69,16 +68,7 @@ Menu::Menu() : Qt::CTRL | Qt::Key_Comma, this, SLOT(editPreferences())))->setMenuRole(QAction::PreferencesRole); - -#if defined(Q_OS_MAC) && defined(QT_NO_DEBUG) - // show "Check for Updates" in the menu - (addActionToQMenuAndActionHash(fileMenu, - MenuOption::CheckForUpdates, - 0, - this, - SLOT(checkForUpdates())))->setMenuRole(QAction::ApplicationSpecificRole); -#endif - + addDisabledActionAndSeparator(fileMenu, "Voxels"); addActionToQMenuAndActionHash(fileMenu, MenuOption::ExportVoxels, Qt::CTRL | Qt::Key_E, appInstance, SLOT(exportVoxels())); addActionToQMenuAndActionHash(fileMenu, MenuOption::ImportVoxels, Qt::CTRL | Qt::Key_I, appInstance, SLOT(importVoxels())); @@ -558,15 +548,6 @@ void Menu::exportSettings() { } } -void Menu::checkForUpdates() { -#if defined(Q_OS_MAC) && defined(QT_NO_DEBUG) - qDebug() << "Checking if there are available updates.\n"; - // if this is a release OS X build use fervor to check for an update - FvUpdater::sharedUpdater()->SetFeedURL("http://s3.highfidelity.io/appcast.xml"); - FvUpdater::sharedUpdater()->CheckForUpdatesSilent(); -#endif -} - void Menu::loadAction(QSettings* set, QAction* action) { if (action->isChecked() != set->value(action->text(), action->isChecked()).toBool()) { action->trigger(); diff --git a/interface/src/Menu.h b/interface/src/Menu.h index e95b3c15bc..16234ea0fc 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -65,7 +65,6 @@ public slots: void saveSettings(QSettings* settings = NULL); void importSettings(); void exportSettings(); - void checkForUpdates(); private slots: void aboutApp(); @@ -128,7 +127,6 @@ namespace MenuOption { const QString Atmosphere = "Atmosphere"; const QString Bandwidth = "Bandwidth Display"; const QString BandwidthDetails = "Bandwidth Details"; - const QString CheckForUpdates = "Check for Updates..."; const QString Collisions = "Collisions"; const QString CopyVoxels = "Copy"; const QString CoverageMap = "Render Coverage Map";