From b1bf9f3aa6e308cabfd3c49cac9c50334b330e02 Mon Sep 17 00:00:00 2001 From: shun-iwasawa Date: Mar 22 2022 07:34:50 +0000 Subject: fix maddin200 pointed problems part2 --- diff --git a/toonz/sources/tnztools/hookselection.cpp b/toonz/sources/tnztools/hookselection.cpp index 9d0f112..d85c81f 100644 --- a/toonz/sources/tnztools/hookselection.cpp +++ b/toonz/sources/tnztools/hookselection.cpp @@ -96,7 +96,7 @@ void HooksData::storeHookPositions(const std::vector &ids) { if (ids.empty()) return; TTool::Application *app = TTool::getApplication(); TXshLevelP level = app->getCurrentLevel()->getLevel(); - assert(level = m_level); + assert(level == m_level); if (level != m_level || !m_level || m_level->getSimpleLevel()->isReadOnly()) return; HookSet *hookSet = m_level->getHookSet(); diff --git a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp index d2ca501..c9fc1f3 100644 --- a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp +++ b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp @@ -69,8 +69,8 @@ TFilePath getGlobalRoot() { // Leggo la globalRoot da File txt #ifdef MACOSX // If MACOSX, change to MACOSX path - std::string unixpath = "./" + tver.getAppName() + - ".app/Contents/Resources/configfarmroot.txt"; + std::string unixpath = + "./" + tver.getAppName() + ".app/Contents/Resources/configfarmroot.txt"; #else // set path to something suitable for most linux (Unix?) systems std::string unixpath = "/etc/" + tver.getAppName() + "/opentoonz.conf"; @@ -104,8 +104,9 @@ TFilePath getLocalRoot() { TFilePath lroot; #ifdef _WIN32 - std::string regpath = "SOFTWARE\\" + tver.getAppName() + "\\" + tver.getAppName() + - "\\" + tver.getAppVersionString() + "\\FARMROOT"; + std::string regpath = "SOFTWARE\\" + tver.getAppName() + "\\" + + tver.getAppName() + "\\" + tver.getAppVersionString() + + "\\FARMROOT"; TFilePath name(regpath); lroot = TFilePath(TSystem::getSystemValue(name).toStdString()) + TFilePath("toonzfarm"); @@ -113,12 +114,13 @@ TFilePath getLocalRoot() { // Leggo la localRoot da File txt #ifdef MACOSX // If MACOSX, change to MACOSX path - std::string unixpath = "./" + tver.getAppName() + - ".app/Contents/Resources/configfarmroot.txt"; + std::string unixpath = + "./" + tver.getAppName() + ".app/Contents/Resources/configfarmroot.txt"; #else // set path to something suitable for most linux (Unix?) systems #ifdef FREEBSD - std::string unixpath = "/usr/local/etc/" + tver.getAppName() + "/opentoonz.conf"; + std::string unixpath = + "/usr/local/etc/" + tver.getAppName() + "/opentoonz.conf"; #else std::string unixpath = "/etc/" + tver.getAppName() + "/opentoonz.conf"; #endif @@ -767,7 +769,7 @@ inline QString toString(const TFarmTask &task, int ver) { ss += QString::number(task.m_platform) + ","; int depCount = 0; - if (task.m_dependencies) depCount= task.m_dependencies->getTaskCount(); + if (task.m_dependencies) depCount = task.m_dependencies->getTaskCount(); ss += QString::number(depCount); @@ -1160,7 +1162,7 @@ CtrlFarmTask *FarmController::getTaskToStart(FarmServerProxy *server) { task->m_platform == server->m_platform)) && (((task->m_status == Waiting && task->m_priority > maxPriority) || (task->m_status == Aborted && task->m_failureCount < 3)) && - task->m_parentId != "")) { + task->m_parentId != "")) { bool dependenciesCompleted = true; if (task->m_dependencies) { @@ -1320,7 +1322,7 @@ bool FarmController::tryToStartTask(CtrlFarmTask *task) { m_tasks.find(TaskId(*itSubTaskId)); if (itSubTask != m_tasks.end()) { CtrlFarmTask *subTask = itSubTask->second; - if (tryToStartTask(subTask)) started= true; + if (tryToStartTask(subTask)) started = true; } } @@ -1775,8 +1777,7 @@ void FarmController::taskSubmissionError(const QString &taskId, int errCode) { } parentTask->m_status = parentTaskState; - if (parentTask->m_status == Aborted || - parentTask->m_status == Aborted) { + if (parentTask->m_status == Aborted) { parentTask->m_completionDate = task->m_completionDate; if (parentTask->m_toBeDeleted) m_tasks.erase(itParent); } @@ -1861,7 +1862,7 @@ void FarmController::taskCompleted(const QString &taskId, int exitCode) { switch (exitCode) { case 0: task->m_status = Completed; - if (isAScript(task)) task->m_successfullSteps= task->m_stepCount; + if (isAScript(task)) task->m_successfullSteps = task->m_stepCount; break; case RENDER_LICENSE_NOT_FOUND: task->m_status = Waiting; @@ -2342,7 +2343,7 @@ void ControllerService::onStart(int argc, char *argv[]) { msg += "\n"; m_userLog->info(msg); -// std::cout << msg; + // std::cout << msg; #ifdef __sgi { remove("/tmp/.tfarmcontroller.dat"); } diff --git a/toonz/sources/toonzlib/plasticdeformerfx.cpp b/toonz/sources/toonzlib/plasticdeformerfx.cpp index 6fda56e..c46d9e9 100644 --- a/toonz/sources/toonzlib/plasticdeformerfx.cpp +++ b/toonz/sources/toonzlib/plasticdeformerfx.cpp @@ -148,7 +148,7 @@ std::string PlasticDeformerFx::getAlias(double frame, meshColumnObj->getPlasticSkeletonDeformation(); if (sd) alias += ", " + toString(sd, meshColumnObj->paramsTime(frame)); - alias + "]"; + alias += "]"; return alias; }