Fixing a double battery load on initial cart load

--- src/GBEmu/GBCartridge.cpp
+++ src/GBEmu/GBCartridge.cpp
@@ -55,6 +55,7 @@
 		m_pMem->LoadMemory( m_pRom, 0, sizeof( ubyte ) * 0x4000 );
 		m_pMem->SetMemBankController( CreateMemBankController( m_oHeader.u8CartridgeType ) );

+		// Attempt to load the .sav file for this rom
 		LoadBattery();
 	}
 }
@@ -74,16 +75,10 @@

 		if( ValidateCartridgeHeader( u8CartridgeHeader ) )
 		{
+			m_szBatteryDirectory = szBatteryDirectory;
+
 			LoadCartridgeHeader( u8CartridgeHeader );
 			bLoaded = LoadCartridge( pFile );
-		}
-
-		// Attempt to load the .sav file for this rom
-		if(		bLoaded
-			&&	szBatteryDirectory )
-		{
-			m_szBatteryDirectory = szBatteryDirectory;
-			LoadBattery();
 		}

 		fclose( pFile );
@@ -156,6 +151,8 @@
 		delete m_pMemBankController;
 		m_pMemBankController = NULL;
 	}
+
+	m_szBatteryDirectory = NULL;

 	m_bLoaded = false;
 }


cc: Only activate pending tree when resources are ready.

Activating without visible resources ready is causing a flash of
checkerboard and low-res contents for all webui pages on ChromeOS.
By delaying the first tree activation until visible resources are
ready the behavior is the same as without impl-side painting.

BUG=223819
TEST=Open settings on cros when using --slow-down-raster-scale-factor=500

Review URL: https://chromiumcodereview.appspot.com/12843038

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@190773 0039d316-1c4b-4281-b951-d872f2087c98

--- cc/trees/layer_tree_host_impl.cc
+++ cc/trees/layer_tree_host_impl.cc
@@ -1145,11 +1145,9 @@
                           "PendingTree", pending_tree_.get(), "activate",
                           "state", ValueToString(ActivationStateAsValue()));

-  // It's always fine to activate to an empty tree.  Otherwise, only
-  // activate once all visible resources in pending tree are ready
+  // Activate once all visible resources in pending tree are ready
   // or tile manager has no work scheduled for pending tree.
-  if (active_tree_->root_layer() &&
-      !pending_tree_->AreVisibleResourcesReady()) {
+  if (!pending_tree_->AreVisibleResourcesReady()) {
     // In smoothness takes priority mode, the pending tree's priorities are
     // ignored, so the tile manager may not have work for it even though it
     // is simultaneously not ready to be activated.


Integration tests for system tasks.

Integration tests for system tasks.

--- AppSource/IntegrationTest/Tests/TaskSchedulerTest.cpp
+++ AppSource/IntegrationTest/Tests/TaskSchedulerTest.cpp
@@ -39,11 +39,12 @@
     {
         namespace
         {
-            constexpr std::array<CS::TaskType, 4> k_backgroundTaskTypes =
+            constexpr std::array<CS::TaskType, 5> k_backgroundTaskTypes =
             {
                 CS::TaskType::k_small,
                 CS::TaskType::k_large,
                 CS::TaskType::k_gameLogic,
+                CS::TaskType::k_system,
                 CS::TaskType::k_file
             };

@@ -140,7 +141,8 @@
                     taskScheduler->ScheduleTask(taskType, [=](const CS::TaskContext& in_taskContext) noexcept
                     {
                         CSIT_ASSERT(in_taskContext.GetType() == taskType, "Incorrect task type.");
-                        CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                        //TODO: Re-add this once main and system threads are seperated
+                        //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");

                         if (++(*taskTypesPassed) == k_backgroundTaskTypes.size())
                         {
@@ -203,7 +205,8 @@
                         tasks.push_back([=](const CS::TaskContext& in_taskContext) noexcept
                         {
                             CSIT_ASSERT(in_taskContext.GetType() == taskType, "Incorrect task type.");
-                            CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                            //TODO: Re-add this once main and system threads are seperated
+                            //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");

                             if (++(*executedTaskCount) == k_numTasksPerTaskType)
                             {
@@ -276,7 +279,8 @@
                         tasks.push_back([=](const CS::TaskContext& in_taskContext) noexcept
                         {
                             CSIT_ASSERT(in_taskContext.GetType() == taskType, "Incorrect task type.");
-                            CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                            //TODO: Re-add this once main and system threads are seperated
+                            //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");

                             ++(*executedTaskCount);
                         });
@@ -285,7 +289,8 @@
                     taskScheduler->ScheduleTasks(taskType, tasks, [=](const CS::TaskContext& in_taskContext) noexcept
                     {
                         CSIT_ASSERT(in_taskContext.GetType() == taskType, "Incorrect task type.");
-                        CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                        //TODO: Re-add this once main and system threads are seperated
+                        //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
                         CSIT_ASSERT(*executedTaskCount == k_numTasksPerTaskType, "An incorrect amount of tasks were run.");

                         if (++(*taskTypesPassed) >= k_backgroundTaskTypes.size())
@@ -350,7 +355,8 @@
                     taskScheduler->ScheduleTask(taskType, [=](const CS::TaskContext& in_parentTaskContext) noexcept
                     {
                         CSIT_ASSERT(in_parentTaskContext.GetType() == taskType, "Incorrect task type.");
-                        CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                        //TODO: Re-add this once main and system threads are seperated
+                        //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");

                         std::atomic<u32> executedTaskCount(0);
                         std::vector<CS::Task> tasks;
@@ -359,7 +365,8 @@
                             tasks.push_back([=, &executedTaskCount](const CS::TaskContext& in_taskContext) noexcept
                             {
                                 CSIT_ASSERT(in_taskContext.GetType() == taskType, "Incorrect task type.");
-                                CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                                //TODO: Re-add this once main and system threads are seperated
+                                //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");

                                 ++executedTaskCount;
                             });
@@ -396,7 +403,8 @@
                     level1Tasks.push_back([=](const CS::TaskContext& in_level1TaskContext) noexcept
                     {
                         CSIT_ASSERT(in_level1TaskContext.GetType() == CS::TaskType::k_small, "Incorrect task type.");
-                        CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                        //TODO: Re-add this once main and system threads are seperated
+                        //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");

                         std::vector<CS::Task> level2Tasks;
                         for (u32 level2TaskIndex = 0; level2TaskIndex < k_numTasksPerLevel; ++level2TaskIndex)
@@ -404,7 +412,8 @@
                             level2Tasks.push_back([=](const CS::TaskContext& in_level2TaskContext) noexcept
                             {
                                 CSIT_ASSERT(in_level2TaskContext.GetType() == CS::TaskType::k_small, "Incorrect task type.");
-                                CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                                //TODO: Re-add this once main and system threads are seperated
+                                //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");

                                 std::vector<CS::Task> level3Tasks;
                                 for (u32 level3TaskIndex = 0; level3TaskIndex < k_numTasksPerLevel; ++level3TaskIndex)
@@ -428,7 +437,8 @@
                 taskScheduler->ScheduleTasks(CS::TaskType::k_small, level1Tasks, [=](const CS::TaskContext& in_taskContext) noexcept
                 {
                     CSIT_ASSERT(in_taskContext.GetType() == CS::TaskType::k_small, "Incorrect task type.");
-                    CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                    //TODO: Re-add this once main and system threads are seperated
+                    //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");;
                     CSIT_ASSERT(*executedLevel3TaskCount == u32(std::pow(k_numTasksPerLevel, k_numLevels)), "An incorrect amount of tasks were run.");

                     CSIT_PASS();
@@ -463,11 +473,13 @@

                 taskScheduler->ScheduleTask(CS::TaskType::k_gameLogic, [=](const CS::TaskContext&) noexcept
                 {
-                    CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                    //TODO: Re-add this once main and system threads are seperated
+                    //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");

                     taskScheduler->ScheduleTask(CS::TaskType::k_mainThread, [=](const CS::TaskContext&) noexcept
                     {
-                        CSIT_ASSERT(taskScheduler->IsMainThread(), "Task run on incorrect thread.");
+                        //TODO: Re-add this once main and system threads are seperated
+                        //CSIT_ASSERT(!taskScheduler->IsMainThread(), "Task run on incorrect thread.");
                         CSIT_ASSERT(scheduledFrameIndex == app->GetFrameIndex(), "Task was not run within the same frame as it was scheduled.");

                         CSIT_PASS();


We need to pin Chrome Frame so that it doesn't get stuck on releasing Breakpad.

The Broker interacts with Chrome Frame from a Worker Thread, and if this thread is the last one to release the Chrome Frame COM object, then the Chrome Frame DLL will be relased during CoUninitialize and will try to release Breakpad while the breakpad thread is stuck on the loader lock.

BUG=65116
TEST=Make sure the Broker exists cleanly and in a reasonable amount of time.

Review URL: http://codereview.chromium.org/5522002

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@68042 0039d316-1c4b-4281-b951-d872f2087c98

--- ceee/ie/broker/chrome_postman.cc
+++ ceee/ie/broker/chrome_postman.cc
@@ -244,6 +244,19 @@
     LOG(ERROR) << "Failed to start chrome frame " << com::LogHr(hr);
     return hr;
   }
+  // We need to pin the Chrome Frame DLL so that it doesn't get unloaded
+  // while we call CoUninitialize in our thread cleanup, otherwise we would
+  // get stuck on breakpad termination as filed in http://crbug.com/64388.
+  static bool s_pinned = false;
+  if (!s_pinned) {
+    HMODULE unused;
+    if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_PIN, L"npchrome_frame.dll",
+                           &unused)) {
+      NOTREACHED() << "Failed to pin Chrome Frame. " << com::LogWe();
+    } else {
+      s_pinned = true;
+    }
+  }
   return hr;
 }


changes if pixelvalue is smaller than zero

--- src/Helpers/Validator.cpp
+++ src/Helpers/Validator.cpp
@@ -27,8 +27,9 @@
         {
             index[0] = x;
             index[1] = y;
-            bool maskIsSet = static_cast<bool>( mask->GetPixel( index ) );
-            bool groundtruthIsSet = static_cast<bool>( groundtruth->GetPixel( index ) );
+            bool maskIsSet = static_cast<bool>( mask->GetPixel( index )>0 );
+
+            bool groundtruthIsSet = static_cast<bool>( groundtruth->GetPixel( index )>0 );
             if( maskIsSet ) maskCnt++;
             if( groundtruthIsSet ) groundtruthCnt++;
             if( groundtruthIsSet && maskIsSet ) maskAndGroundtruthCnt++;


CurvesAlgo : Make CurvesPrimitiveEvaluator the regular way

This avoids some unnecessary casts and tests.

--- src/IECore/CurvesAlgo.cpp
+++ src/IECore/CurvesAlgo.cpp
@@ -258,13 +258,7 @@
 			return nullptr;
 		}

-		IECore::ConstCurvesPrimitiveEvaluatorPtr evaluator =  runTimeCast<CurvesPrimitiveEvaluator>(IECore::PrimitiveEvaluator::create( m_curves )) ;
-
-		if( !evaluator )
-		{
-			return nullptr;
-		}
-
+		ConstCurvesPrimitiveEvaluatorPtr evaluator = new CurvesPrimitiveEvaluator( m_curves );
 		PrimitiveEvaluator::ResultPtr evaluatorResult = evaluator->createResult();

 		size_t numCurves = m_curves->numCurves();
@@ -316,12 +310,7 @@
 			return nullptr;
 		}

-		IECore::ConstCurvesPrimitiveEvaluatorPtr evaluator =  runTimeCast<CurvesPrimitiveEvaluator>(IECore::PrimitiveEvaluator::create( m_curves )) ;
-		if( !evaluator )
-		{
-			return nullptr;
-		}
-
+		ConstCurvesPrimitiveEvaluatorPtr evaluator = new CurvesPrimitiveEvaluator( m_curves );
 		PrimitiveEvaluator::ResultPtr evaluatorResult = evaluator->createResult();

 		size_t numCurves = m_curves->numCurves();


make find stages better

make find stages better

--- c7a/engine/stage_builder.hpp
+++ c7a/engine/stage_builder.hpp
@@ -12,6 +12,7 @@
 #include <string>
 #include <utility>
 #include <algorithm>
+#include <set>

 namespace c7a {
 namespace engine {
@@ -35,20 +36,23 @@
 // Returns a list of stages of graph scope
 void  FindStages(DIABase* action, std::vector<Stage> & stages_result) {
     SpacingLogger(true) << "FINDING stages:";
-
+    std::set<DIABase*> stages_found;
     // GOAL: Returns a vector with stages
     // TEMP SOLUTION: Every node is a stage
     std::stack<DIABase*> dia_stack;
     dia_stack.push(action);
+    stages_found.insert(action);
     while (!dia_stack.empty()) {
         DIABase* curr = dia_stack.top();
-        // SpacingLogger(true) << curr;
         dia_stack.pop();
         stages_result.emplace_back(Stage(curr));
         std::vector<DIABase*> parents = curr->get_parents();
         for (DIABase* p : parents) {
-            // SpacingLogger(true) << "PTR IS" << p;
-            if (p) dia_stack.push(p);
+
+            if (p && (stages_found.find(p) == stages_found.end())) {
+                dia_stack.push(p);
+                stages_found.insert(p);
+            }
             else SpacingLogger(true) << "OMG NULLPTR";
         }
     }


Remove redundant get() call on smart pointer

--- cc/dual_net/lite_dual_net.cc
+++ cc/dual_net/lite_dual_net.cc
@@ -34,7 +34,7 @@
   MG_CHECK(model_ != nullptr);

   BuiltinOpResolver resolver;
-  InterpreterBuilder(*model_.get(), resolver)(&interpreter_);
+  InterpreterBuilder(*model_, resolver)(&interpreter_);
   MG_CHECK(interpreter_ != nullptr);

   // Let's just use all the processors we can.


minor fix

minor fix

--- cc/mapi-settings-antigens.cc
+++ cc/mapi-settings-antigens.cc
@@ -352,7 +352,7 @@
         else if (passage_key == "reassortant"sv)
             ag_sr.filter_reassortant(ind);
         else if (bas == basic::no) {
-            if (!passage_key.empty() && passage_key[0] == '~') {
+            if (passage_key.size() > 1 && passage_key[0] == '~') {
                 const std::regex re{std::next(std::begin(passage_key), 1), std::end(passage_key), acmacs::regex::icase};
                 ag_sr.filter_passage(ind, re);
             }


openglsurfacepainter.cpp: remove '+1' for right and bottom in QRECT_TO_GLMATRIX

The '+1' calculation is wrong now that QRectF is used instead of QRect.

--- elements/gstqtvideosink/painters/openglsurfacepainter.cpp
+++ elements/gstqtvideosink/painters/openglsurfacepainter.cpp
@@ -37,10 +37,10 @@

 #define QRECT_TO_GLMATRIX(rect) \
     { \
-        GLfloat(rect.left())     , GLfloat(rect.bottom() + 1), \
-        GLfloat(rect.right() + 1), GLfloat(rect.bottom() + 1), \
+        GLfloat(rect.left())     , GLfloat(rect.bottom()), \
+        GLfloat(rect.right()), GLfloat(rect.bottom()), \
         GLfloat(rect.left())     , GLfloat(rect.top()), \
-        GLfloat(rect.right() + 1), GLfloat(rect.top()) \
+        GLfloat(rect.right()), GLfloat(rect.top()) \
     }

 OpenGLSurfacePainter::OpenGLSurfacePainter()


INTEGRATION: CWS vgbugs07 (1.11.124); FILE MERGED 2007/06/04 13:23:20 vg 1.11.124.1: #i76605# Remove -I .../inc/module hack introduced by hedaburemove01

--- xmloff/source/chart/contexts.cxx
+++ xmloff/source/chart/contexts.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: contexts.cxx,v $
  *
- *  $Revision: 1.11 $
- *
- *  last change: $Author: obo $ $Date: 2006-09-17 10:17:46 $
+ *  $Revision: 1.12 $
+ *
+ *  last change: $Author: hr $ $Date: 2007-06-27 14:53:20 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -41,16 +41,16 @@
 #endif

 #ifndef _XMLOFF_XMLTOKEN_HXX
-#include "xmltoken.hxx"
+#include <xmloff/xmltoken.hxx>
 #endif
 #ifndef _XMLOFF_XMLNMSPE_HXX
 #include "xmlnmspe.hxx"
 #endif
 #ifndef _XMLOFF_XMLMETAI_HXX
-#include "xmlmetai.hxx"
+#include <xmloff/xmlmetai.hxx>
 #endif
 #ifndef _XMLOFF_XMLSTYLE_HXX
-#include "xmlstyle.hxx"
+#include <xmloff/xmlstyle.hxx>
 #endif
 #ifndef SCH_XMLIMPORT_HXX_
 #include "SchXMLImport.hxx"


Update Stub VR with new VR code organization

--- src/OpenVRDevice_Stub.cpp
+++ src/OpenVRDevice_Stub.cpp
@@ -137,11 +137,21 @@
   void OpenVRDevice::updateViewOffsets()
   {
     // Simulate raw left/right eye vectors relative to HMD origin
-    osg::Vec3d rightEyeRaw(0.03, 0.01, -0.01);
-    osg::Vec3d leftEyeRaw(-0.03, 0.01, -0.01);
-
-    // Compute view offsets from raw offset vectors
-    computeViewOffsets(rightEyeRaw, leftEyeRaw);
+    _rightEyeViewOffsetRaw.set(0.03, 0.01, -0.01);
+    _leftEyeViewOffsetRaw.set(-0.03, 0.01, -0.01);
+
+    // Compute HMD center view offset vector (Eye to Head transform)
+    _centerViewOffsetRaw = (_rightEyeViewOffsetRaw + _leftEyeViewOffsetRaw)*0.5;
+    _rightEyeViewOffsetRaw -= _centerViewOffsetRaw;
+    _leftEyeViewOffsetRaw -= _centerViewOffsetRaw;
+
+    // Print new IPD value if needed
+    double ipd = (_rightEyeViewOffsetRaw - _leftEyeViewOffsetRaw).length();
+    if (ipd != _ipd)
+    {
+      osg::notify(osg::ALWAYS) << "VR Interpupillary Distance: " << ipd * 1000.0f << "mm" << std::endl;
+      _ipd = ipd;
+    }
   }

   /*************************************************************/
@@ -182,8 +192,8 @@
         _deviceIDToModel[i]._modelTransform->setNodeMask(0x0);
     }

-    // Compute device transforms from raw poses
-    computeDeviceTransforms();
+    // Update the HMD->Eye view offset vectors
+    updateViewOffsets();
   }

   /*************************************************************/
@@ -209,6 +219,10 @@
   /*************************************************************/
   bool OpenVRTrackball::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us)
   {
+    // Compute new motion-based view at each frame
+    if (ea.getEventType() == osgGA::GUIEventAdapter::FRAME)
+      processMotion();
+
     // Just call parent trackball handler
     return FollowingTrackball::handle(ea, us);
   }


INTEGRATION: CWS oasis (1.5.276); FILE MERGED 2004/04/21 07:27:25 mib 1.5.276.1: - separated attribute lists for <*-properties> elements on import (#i20153#) - replaced "style:text-backgroubnd-color" with "fo:background-color"

--- xmloff/source/style/xmlprmap.cxx
+++ xmloff/source/style/xmlprmap.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: xmlprmap.cxx,v $
  *
- *  $Revision: 1.5 $
- *
- *  last change: $Author: dvo $ $Date: 2001-07-25 13:55:54 $
+ *  $Revision: 1.6 $
+ *
+ *  last change: $Author: rt $ $Date: 2004-07-13 08:28:32 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -224,6 +224,7 @@
 const sal_Int32 XMLPropertySetMapper::GetEntryIndex(
         sal_uInt16 nNamespace,
         const OUString& rStrName,
+        sal_uInt32 nPropType,
         sal_Int32 nStartAt /* = -1 */ ) const
 {
     sal_Int32 nEntries = GetEntryCount();
@@ -232,7 +233,8 @@
     do
     {
         const XMLPropertySetMapperEntry_Impl& rEntry = aMapEntries[nIndex];
-        if( rEntry.nXMLNameSpace == nNamespace &&
+        if( (!nPropType || nPropType == rEntry.GetPropType()) &&
+            rEntry.nXMLNameSpace == nNamespace &&
             rStrName == rEntry.sXMLAttributeName )
             return nIndex;
         else


Update ex3_35.cpp

Update ex3_35.cpp

--- ch03/ex3_35.cpp
+++ ch03/ex3_35.cpp
@@ -1,19 +1,12 @@
 #include <iostream>
-#include <iterator>
-
-using std::begin; using std::end; using std::cout; using std::endl;
+using std::cout; using std::endl;

 int main()
 {
     int arr[10];
-    int *b = begin(arr);
-    int *e = end(arr);
-
-    for (int *i = b; i != e; ++i)
-      *i = 0;
-
-    for (auto i : arr)
-      cout << i << " ";
+    for (auto ptr = arr; ptr != arr + 10; ++ptr) *ptr = 0;
+
+    for (auto i : arr) cout << i << " ";
     cout << endl;

     return 0;


Update ex5_20.cpp

Update ex5_20.cpp

Removed superfluous else condition.

--- ch05/ex5_20.cpp
+++ ch05/ex5_20.cpp
@@ -6,7 +6,7 @@
 {
     string read, tmp;
     while (cin >> read)
-        if (read == tmp) break; else tmp = read;
+        if (read == tmp) break; tmp = read;

     if (cin.eof())  cout << "no word was repeated." << endl;
     else            cout << read << " occurs twice in succession." << endl;


Update ex8_05.cpp

Update ex8_05.cpp

--- ch08/ex8_05.cpp
+++ ch08/ex8_05.cpp
@@ -5,8 +5,7 @@
 //  Created by pezy on 11/9/14.
 //  Copyright (c) 2014 pezy. All rights reserved.
 //
-//  @Brief  Rewrite the previous program to store each word in a separate
-//  element.
+//  @Brief  Rewrite the previous program to store each word in a separate element
 //  @See    ex8_04.cpp

 #include <fstream>


Add missing std namespace to endl

Add missing std namespace to endl

--- Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDiffusionRegistrationView.cpp
+++ Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDiffusionRegistrationView.cpp
@@ -457,7 +457,7 @@
     dirIterator.next();

     list.append(dirIterator.fileInfo().absoluteFilePath());
-    std::cout << dirIterator.fileInfo().absoluteFilePath().toStdString() << endl;
+    std::cout << dirIterator.fileInfo().absoluteFilePath().toStdString() << std::endl;
     m_BatchList = list;

     m_IsBatch = true;


Fix eliminating stores to pointer arguments.

If a store address has no definition, it must be a pointer argument.
Unlike stores to alloca's, these are not dead.

Change-Id: I66e50b14ffea1cfc61fc756b5545ab8ae28b4bf8
Reviewed-on: https://swiftshader-review.googlesource.com/8573
Tested-by: Nicolas Capens <0612353e1fcebbfd4b302d9337447ca0cdfa9122@google.com>
Reviewed-by: Alexis Hétu <1c7141772178a7e80858c3db5052b328076f08f4@google.com>
Reviewed-by: Nicolas Capens <0612353e1fcebbfd4b302d9337447ca0cdfa9122@google.com>

--- src/Reactor/Optimizer.cpp
+++ src/Reactor/Optimizer.cpp
@@ -454,7 +454,7 @@
 			{
 				Ice::Inst *def = definition[address];

-				if(!def || llvm::isa<Ice::InstAlloca>(def))
+				if(def && llvm::isa<Ice::InstAlloca>(def))
 				{
 					return uses[address].size() == 1;   // Dead if this store is the only use
 				}


function-args-by-ref: Blacklist even more stuff already fixed in Qt 6

--- checks/functionargsbyref.cpp
+++ checks/functionargsbyref.cpp
@@ -70,7 +70,14 @@
     static const vector<string> ignoreList = {"operator<<"};
     static const vector<string> qualifiedIgnoreList = {"QDBusMessage::createErrorReply", // Fixed in Qt6
                                                        "QMenu::exec", // Fixed in Qt6
-                                                       "QTextFrame::iterator" // Fixed in Qt6
+                                                       "QTextFrame::iterator", // Fixed in Qt6
+                                                       "QGraphicsWidget::addActions", // Fixed in Qt6
+                                                       "QListWidget::mimeData", // Fixed in Qt6
+                                                       "QTableWidget::mimeData", // Fixed in Qt6
+                                                       "QTreeWidget::mimeData", // Fixed in Qt6
+                                                       "QWidget::addActions", // Fixed in Qt6
+                                                       "QSslCertificate::verify", // Fixed in Qt6
+                                                       "QSslConfiguration::setAllowedNextProtocols" // Fixed in Qt6
                                                       };
     if (std::find(ignoreList.cbegin(), ignoreList.cend(), function->getNameAsString()) != ignoreList.cend())
         return true;


matematica melhor no cliptest

matematica melhor no cliptest

--- chimera/src/render/Plane.cpp
+++ chimera/src/render/Plane.cpp
@@ -36,14 +36,13 @@
     glm::vec3 dir = this->point - (*point);
     float clipTest = glm::dot(dir, this->normal);

-    clipTest = fabs(clipTest) < EPSILON ? 0.0f : clipTest;
+    if (fabs(clipTest) < EPSILON)
+        SIDE::CP_ONPLANE;

     if (clipTest < 0.0f)
         return SIDE::CP_FRONT;
-    else if (clipTest > 0.0f)
-        return SIDE::CP_BACK;

-    return SIDE::CP_ONPLANE;
+    return SIDE::CP_BACK;
 }

 SIDE Plane::classifyPoly(const glm::vec3& pA, const glm::vec3& pB, const glm::vec3& pC, glm::vec3* clipTest) {
@@ -58,15 +57,15 @@
     result[2] = glm::dot((this->point - pC), this->normal); // Clip Test poin C

     for (unsigned short a = 0; a < 3; a++) {
-        result[a] = fabs(result[a]) < EPSILON ? 0.0f : result[a];
-        if (result[a] > 0.0f) {
-            behind++;
-        } else if (result[a] < 0.0f) {
-            infront++;
-        } else {
+        if (fabs(result[a]) < EPSILON) {
+            result[a] = 0.0f;
             onPlane++;
             infront++;
             behind++;
+        } else if (result[a] > 0.0f) {
+            behind++;
+        } else { // result[a] < 0.0f
+            infront++;
         }
     }


Make breakpad work in the seccomp sandbox. Take advantage of a feature
in linux_syscall_support.h that allows us to mark all places where we
embedd direct system calls. This allows the sandbox to rewrite them as
needed.

Also mark a few system calls as having ignored return codes. This makes
some compilers happy and prevents warning messages.

Finally, add more verbose error messages if crashdumping fails. There are
various reasons why breakpad can be prevented from doing its job. And
these error messages have proven helpful. We should leave them in the
production binary.

TEST=add --enable-seccomp-mode to command line and go to about:crash
BUG=37728
Review URL: http://codereview.chromium.org/3122028

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@56694 4ff67af0-8c30-449e-8e8b-ad334ec8d88c


Remove a stale comment.  net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION
now causes the security style to be set to authentication broken.
(The security style is set elsewhere, not here, but this comment
is still confusing.)

R=jcampan
BUG=4749
Review URL: http://codereview.chromium.org/13371

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@6805 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ssl_policy.cc
+++ chrome/browser/ssl_policy.cc
@@ -187,7 +187,7 @@

   void OnCertError(const GURL& main_frame_url,
                    SSLManager::CertError* error) {
-    // We keep the style as secure and we display an info-bar.
+    // We ignore this error and display an info-bar.
     error->ContinueRequest();
     error->manager()->ShowMessage(l10n_util::GetString(
         IDS_CERT_ERROR_UNABLE_TO_CHECK_REVOCATION_INFO_BAR));


Don't display the bookmark bar when in fullscreen mode.

BUG=105915
TEST=Enable bookmark bar (Ctrl+Shift+B) and enter fullscreen mode. Bookmark bar should not be visible

Review URL: http://codereview.chromium.org/8883038

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@113769 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -1399,6 +1399,8 @@

 void Browser::WindowFullscreenStateChanged() {
   fullscreen_controller_->WindowFullscreenStateChanged();
+  UpdateCommandsForFullscreenMode(window_->IsFullscreen());
+  UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
 }

 ///////////////////////////////////////////////////////////////////////////////
@@ -4193,11 +4195,6 @@
       UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
       break;

-    case chrome::NOTIFICATION_FULLSCREEN_CHANGED:
-      UpdateCommandsForFullscreenMode(window_->IsFullscreen());
-      UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
-      break;
-
     default:
       NOTREACHED() << "Got a notification we didn't register for.";
   }


完善openssl的版本判断

完善openssl的版本判断

--- src/Rtmp/RtmpProtocol.cpp
+++ src/Rtmp/RtmpProtocol.cpp
@@ -34,12 +34,15 @@
 #ifdef ENABLE_OPENSSL
 #include "Util/SSLBox.h"
 #include <openssl/hmac.h>
+#include <openssl/opensslv.h>
+
 static string openssl_HMACsha256(const void *key,unsigned int key_len,
 								 const void *data,unsigned int data_len){
 	std::shared_ptr<char> out(new char[32],[](char *ptr){delete [] ptr;});
 	unsigned int out_len;

-#if defined(WIN32) || defined(ANDROID)
+#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER > 0x10100000L)
+    //openssl 1.1.0新增api，老版本api作废
 	HMAC_CTX *ctx = HMAC_CTX_new();
 	HMAC_CTX_reset(ctx);
 	HMAC_Init_ex(ctx, key, key_len, EVP_sha256(), NULL);


Avoid conditional check for resource_collection_ in RenderWidgetHostViewAura::SendReturnedDelegatedResources.

The function RenderWidgetHostViewAura::SendReturnedDelegatedResources() is called only when
there is a valid resource_collection_ object. This seems a redundant check as the call site
already checks for it hence replacing the condition with a DCHECK(resource_collection_).

R=danakj, sievers, aelias

Review URL: https://codereview.chromium.org/153623003

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@248949 0039d316-1c4b-4281-b951-d872f2087c98

--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1541,10 +1541,12 @@

 void RenderWidgetHostViewAura::SendReturnedDelegatedResources(
     uint32 output_surface_id) {
+  DCHECK(resource_collection_);
+
   cc::CompositorFrameAck ack;
-  if (resource_collection_)
-    resource_collection_->TakeUnusedResourcesForChildCompositor(&ack.resources);
+  resource_collection_->TakeUnusedResourcesForChildCompositor(&ack.resources);
   DCHECK(!ack.resources.empty());
+
   RenderWidgetHostImpl::SendReclaimCompositorResources(
       host_->GetRoutingID(),
       output_surface_id,


Remove a DCHECK when failing to secure the shared memory used to hold the current version. This may well fail on older (read non-NTFS) systems since you can't secure file mappings without a securable file system underneath.

BUG=61609
TEST=No DCHECKing at startup when running on a non-NTFS system.

Review URL: http://codereview.chromium.org/5057007

git-svn-id: http://src.chromium.org/svn/trunk/src@66322 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: fccdd93a3386a56613fd2b5e3cab9d6d407b386c


SceneGraph: Added @todos for some Object weirdness.

--- src/SceneGraph/Object.cpp
+++ src/SceneGraph/Object.cpp
@@ -35,6 +35,7 @@
         /* Only Fry can be his own grandfather */
         ObjectType* p = parent;
         while(p != nullptr) {
+            /** @todo Assert for this */
             if(p == this) return static_cast<ObjectType*>(this);
             p = p->parent();
         }
@@ -104,6 +105,7 @@

 template<class MatrixType, class VectorType, class ObjectType, class SceneType, class CameraType> ObjectType* Object<MatrixType, VectorType, ObjectType, SceneType, CameraType>::setTransformation(const MatrixType& transformation) {
     /* Setting transformation is forbidden for the scene */
+    /** @todo Assert for this? */
     if(isScene()) return static_cast<ObjectType*>(this);

     _transformation = transformation;


Register Locale object in the QtQml namespace.

It was previously registered with QtQuick, which meant QtQuick had to
be imported in order to use Locale; a basic QML object.

Task-number: QTBUG-32505

Change-Id: I9d49cc0d87c0fae07b46885fcdec4f27fb0e0708
Reviewed-by: Alan Alpert <da25f2afbbb946022229108d81aeba0c6b35c5c3@blackberry.com>

--- src/qml/qml/qqmlengine.cpp
+++ src/qml/qml/qqmlengine.cpp
@@ -773,6 +773,7 @@
     if (baseModulesUninitialized) {
         qmlRegisterType<QQmlComponent>("QML", 1, 0, "Component"); // required for the Compiler.
         registerBaseTypes("QtQml", 2, 0); // import which provides language building blocks.
+        qmlRegisterUncreatableType<QQmlLocale>("QtQml", 2, 2, "Locale", QQmlEngine::tr("Locale cannot be instantiated.  Use Qt.locale()"));

         QQmlData::init();
         baseModulesUninitialized = false;


Appendtest now performs benchmark of append operation.

--- appendtest.cpp
+++ appendtest.cpp
@@ -3,29 +3,38 @@
 #include <iostream>
 #include "novoht.h"
 #include <new>
+#include <sys/time.h>

+struct timeval tp;
+double diffclock(clock_t clock1, clock_t clock2){
+   double clock_ts=clock1-clock2;
+   double diffms=(clock_ts*1000)/CLOCKS_PER_SEC;
+   return diffms;
+}
+double getTime_usec() {
+   gettimeofday(&tp, NULL);
+   return static_cast<double>(tp.tv_sec) * 1E6+ static_cast<double>(tp.tv_usec);
+}
 int main (int argc, char ** argv){
-   NoVoHT map("append.txt", 1000, -1);
-   map.append("two","appone");
-   map.append("two", "apptwo");
-   map.append("two", "appthree");
-   map.append("two", "appthree");
-   map.append("two", "appthree");
-   map.append("two", "appthree");
-   map.append("two", "appthree");
-   map.append("two", "appthree");
-   map.append("two", "appthree");
-   map.append("two", "appthree");
-   map.append("two", "applast");
-   map.append("three", "appthree");
-   map.append("three", "appthree");
-   map.append("three", "appthree");
-   map.append("three", "appthree");
-   map.append("three", "appthree");
-   map.append("three", "appthree");
-   map.append("three", "appthree");
-   map.append("three", "applast");
-   cout << map.getSize() << endl;
+   NoVoHT map("append.txt", atoi(argv[1])*2, -1);
+   double a = getTime_usec();
+   for (int i =0; i < atoi(argv[1])/2; i++){
+      if (map.append("two","append") < 0)
+         cerr << "Append Problem" << endl;
+      if (map.append("three","Append") < 0)
+         cerr << "Append Problem" << endl;
+   }
+   double b = getTime_usec();
+   map.remove("two");
+   map.remove("three");
+   double c =getTime_usec();
+   for (int i =0; i < atoi(argv[1]); i++){
+      if (map.append("two","append") < 0)
+         cerr << "Append Problem" << endl;
+   }
+   double d = getTime_usec();
+   cout << "Alternating appends " << (b - a)/1E3 << " milliseconds" << endl;
+   cout << "Consecutive appends " << (d - c)/1E3 << " milliseconds" << endl;

    return 0;
 }


Label Updates

Label Updates

* removed broke linebreaks
* fixed alias new table update text

--- src/qt/myaliaslistpage.cpp
+++ src/qt/myaliaslistpage.cpp
@@ -33,7 +33,7 @@

 	ui->buttonBox->setVisible(false);

-    ui->labelExplanation->setText(tr("These are your registered Syscoin Aliases. New Syscoin Aliases take 120 confirmations to appear in this table. Alias updates take 1 confirmation to appear in this table.

Alias transfers require clicking refresh after 1 confirmation for the table to update."));
+    ui->labelExplanation->setText(tr("These are your registered Syscoin Aliases. Alias updates take 1 confirmation to appear in this table. Alias transfers require clicking refresh after 1 confirmation for the table to update."));

     // Context menu actions
@@ -71,7 +71,7 @@
     if(!walletModel) return;
 	if(walletModel->getEncryptionStatus() == WalletModel::Locked)
 	{
-        ui->labelExplanation->setText(tr("WARNING: Your wallet is currently locked. For security purposes you'll need to enter your passphrase in order to interact with Syscoin Aliases. Because your wallet is locked you must manually refresh this table after creating, updateing or transferring an Alias.  more info

These are your registered Syscoin Aliases. New Syscoin Aliases take 120 confirmations to appear in this table. Alias updates take 1 confirmation to appear in this table.

Alias transfers require clicking refresh after 1 confirmation for the table to update."));
+        ui->labelExplanation->setText(tr("WARNING: Your wallet is currently locked. For security purposes you'll need to enter your passphrase in order to interact with Syscoin Aliases. Because your wallet is locked you must manually refresh this table after creating, updateing or transferring an Alias.  more info

These are your registered Syscoin Aliases. Alias updates take 1 confirmation to appear in this table. Alias transfers require clicking refresh after 1 confirmation for the table to update."));
 		ui->labelExplanation->setTextFormat(Qt::RichText);
 		ui->labelExplanation->setTextInteractionFlags(Qt::TextBrowserInteraction);
 		ui->labelExplanation->setOpenExternalLinks(true);


QT: remove GetAmounts calls or put behind bitcoind mode only

--- src/qt/transactiondesc.cpp
+++ src/qt/transactiondesc.cpp
@@ -172,8 +172,9 @@
             // Debit
             //
             auto mine = wtx.txout_is_mine.begin();
-            for (const CTxOut& txout : wtx.tx->vout)
+            for (unsigned int i = 0; i < wtx.tx->vout.size(); ++i)
             {
+                const CTxOut& txout = wtx.tx->vout[i];
                 // Ignore change
                 isminetype toSelf = *(mine++);
                 if ((toSelf == ISMINE_SPENDABLE) && (fAllFromMe == ISMINE_SPENDABLE))
@@ -199,9 +200,9 @@
                     }
                 }

-                strHTML += "" + tr("Debit") + ": " + BitcoinUnits::formatHtmlWithUnit(unit, -txout.nValue.GetAmount()) + "
";
+                strHTML += "" + tr("Debit") + ": " + BitcoinUnits::formatHtmlWithUnit(unit, -wtx.txout_amounts[i]) + "
";
                 if(toSelf)
-                    strHTML += "" + tr("Credit") + ": " + BitcoinUnits::formatHtmlWithUnit(unit, txout.nValue.GetAmount()) + "
";
+                    strHTML += "" + tr("Credit") + ": " + BitcoinUnits::formatHtmlWithUnit(unit, wtx.txout_amounts[i]) + "
";
             }

             if (fAllToMe)
@@ -281,7 +282,7 @@
     //
     // Debug view
     //
-    if (node.getLogCategories() != BCLog::NONE)
+    if (node.getLogCategories() != BCLog::NONE && !g_con_elementsmode)
     {
         strHTML += "

" + tr("Debug information") + "

";
         for (const CTxIn& txin : wtx.tx->vin)


Flip colors on amounts in txhistory

Flip colors on amounts in txhistory

--- src/qt/txhistorydialog.cpp
+++ src/qt/txhistorydialog.cpp
@@ -478,9 +478,9 @@
                 addressCell->setTextAlignment(Qt::AlignLeft + Qt::AlignVCenter);
                 addressCell->setForeground(QColor("#707070"));
                 amountCell->setTextAlignment(Qt::AlignRight + Qt::AlignVCenter);
-                amountCell->setForeground(QColor("#EE0000"));
+                amountCell->setForeground(QColor("#00AA00"));
                 if (htxo.amount.length() > 0) { // protect against an empty value
-                    if (htxo.amount.substr(0,1) == "-") amountCell->setForeground(QColor("#00AA00")); // outbound
+                    if (htxo.amount.substr(0,1) == "-") amountCell->setForeground(QColor("#EE0000")); // outbound
                 }
                 if (!htxo.fundsMoved) amountCell->setForeground(QColor("#404040"));
                 ui->txHistoryTable->setItem(workingRow, 0, txidCell);


Fixed a warning.

Fixed a warning.

--- src/SourceContextImpl.cpp
+++ src/SourceContextImpl.cpp
@@ -36,7 +36,7 @@
 {
   std::string result = s;
   for (auto &c : result)
-    c = tolower(c);
+    c = (char)tolower(c);
   return result;
 }


nullptr -> FunctionPtr

nullptr -> FunctionPtr

--- src/StorageFlattening.cpp
+++ src/StorageFlattening.cpp
@@ -268,7 +268,7 @@
                                   Call::image_load,
                                   args,
                                   Call::PureIntrinsic,
-                                  nullptr,
+                                  FunctionPtr(),
                                   0,
                                   op->image,
                                   op->param);


Undid the changes made by last commit.

Undid the changes made by last commit.

--- src/rdb_protocol/parser.cc
+++ src/rdb_protocol/parser.cc
@@ -64,12 +64,6 @@
             }
             break;

-        case HEAD:
-        case DELETE:
-        case TRACE:
-        case OPTIONS:
-        case CONNECT:
-        case PATCH:
         default:
             return http_res_t(400);
         }


[standardProfile] updated source code

[standardProfile] updated source code

--- src/common/standardProfile/src_gen/StandardProfile/StandardProfilePackage.hpp
+++ src/common/standardProfile/src_gen/StandardProfile/StandardProfilePackage.hpp
@@ -182,135 +182,135 @@
 				static std::shared_ptr<StandardProfilePackage> eInstance();

 			//Class IDs
-				static const unsigned int AUXILIARY_CLASS = 121;
+				static const unsigned long AUXILIARY_CLASS = 1466047990;
 				static const unsigned int AUXILIARY_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int AUXILIARY_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int BUILDCOMPONENT_CLASS = 166;
+				static const unsigned long BUILDCOMPONENT_CLASS = 133779747;
 				static const unsigned int BUILDCOMPONENT_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int BUILDCOMPONENT_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int CALL_CLASS = 78;
+				static const unsigned long CALL_CLASS = 495006810;
 				static const unsigned int CALL_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int CALL_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int CREATE_CLASS = 44;
+				static const unsigned long CREATE_CLASS = 841207773;
 				static const unsigned int CREATE_CLASS_FEATURE_COUNT = 2;
 				static const unsigned int CREATE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int DERIVE_CLASS = 167;
+				static const unsigned long DERIVE_CLASS = 501351344;
 				static const unsigned int DERIVE_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int DERIVE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int DESTROY_CLASS = 153;
+				static const unsigned long DESTROY_CLASS = 308948604;
 				static const unsigned int DESTROY_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int DESTROY_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int DOCUMENT_CLASS = 22;
+				static const unsigned long DOCUMENT_CLASS = 301496007;
 				static const unsigned int DOCUMENT_CLASS_FEATURE_COUNT = 2;
 				static const unsigned int DOCUMENT_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int ENTITY_CLASS = 151;
+				static const unsigned long ENTITY_CLASS = 2070209470;
 				static const unsigned int ENTITY_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int ENTITY_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int EXECUTABLE_CLASS = 6;
+				static const unsigned long EXECUTABLE_CLASS = 1083872305;
 				static const unsigned int EXECUTABLE_CLASS_FEATURE_COUNT = 2;
 				static const unsigned int EXECUTABLE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int FILE_CLASS = 41;
+				static const unsigned long FILE_CLASS = 242613410;
 				static const unsigned int FILE_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int FILE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int FOCUS_CLASS = 140;
+				static const unsigned long FOCUS_CLASS = 2011110723;
 				static const unsigned int FOCUS_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int FOCUS_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int FRAMEWORK_CLASS = 88;
+				static const unsigned long FRAMEWORK_CLASS = 758834892;
 				static const unsigned int FRAMEWORK_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int FRAMEWORK_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int IMPLEMENT_CLASS = 102;
+				static const unsigned long IMPLEMENT_CLASS = 1810753173;
 				static const unsigned int IMPLEMENT_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int IMPLEMENT_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int IMPLEMENTATIONCLASS_CLASS = 50;
+				static const unsigned long IMPLEMENTATIONCLASS_CLASS = 1555601512;
 				static const unsigned int IMPLEMENTATIONCLASS_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int IMPLEMENTATIONCLASS_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int INSTANTIATE_CLASS = 96;
+				static const unsigned long INSTANTIATE_CLASS = 1393463882;
 				static const unsigned int INSTANTIATE_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int INSTANTIATE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int LIBRARY_CLASS = 144;
+				static const unsigned long LIBRARY_CLASS = 1931384455;
 				static const unsigned int LIBRARY_CLASS_FEATURE_COUNT = 2;
 				static const unsigned int LIBRARY_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int METACLASS_CLASS = 33;
+				static const unsigned long METACLASS_CLASS = 1110600536;
 				static const unsigned int METACLASS_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int METACLASS_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int METAMODEL_CLASS = 70;
+				static const unsigned long METAMODEL_CLASS = 269527075;
 				static const unsigned int METAMODEL_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int METAMODEL_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int MODELLIBRARY_CLASS = 89;
+				static const unsigned long MODELLIBRARY_CLASS = 690477192;
 				static const unsigned int MODELLIBRARY_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int MODELLIBRARY_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int PROCESS_CLASS = 128;
+				static const unsigned long PROCESS_CLASS = 985526206;
 				static const unsigned int PROCESS_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int PROCESS_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int REALIZATION_CLASS = 43;
+				static const unsigned long REALIZATION_CLASS = 1122657704;
 				static const unsigned int REALIZATION_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int REALIZATION_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int REFINE_CLASS = 134;
+				static const unsigned long REFINE_CLASS = 1523062016;
 				static const unsigned int REFINE_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int REFINE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int RESPONSIBILITY_CLASS = 122;
+				static const unsigned long RESPONSIBILITY_CLASS = 737133505;
 				static const unsigned int RESPONSIBILITY_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int RESPONSIBILITY_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int SCRIPT_CLASS = 93;
+				static const unsigned long SCRIPT_CLASS = 364379155;
 				static const unsigned int SCRIPT_CLASS_FEATURE_COUNT = 2;
 				static const unsigned int SCRIPT_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int SEND_CLASS = 75;
+				static const unsigned long SEND_CLASS = 1722014911;
 				static const unsigned int SEND_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int SEND_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int SERVICE_CLASS = 25;
+				static const unsigned long SERVICE_CLASS = 1531161909;
 				static const unsigned int SERVICE_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int SERVICE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int SOURCE_CLASS = 13;
+				static const unsigned long SOURCE_CLASS = 548518589;
 				static const unsigned int SOURCE_CLASS_FEATURE_COUNT = 2;
 				static const unsigned int SOURCE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int SPECIFICATION_CLASS = 90;
+				static const unsigned long SPECIFICATION_CLASS = 504804019;
 				static const unsigned int SPECIFICATION_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int SPECIFICATION_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int SUBSYSTEM_CLASS = 48;
+				static const unsigned long SUBSYSTEM_CLASS = 1825466533;
 				static const unsigned int SUBSYSTEM_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int SUBSYSTEM_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int SYSTEMMODEL_CLASS = 170;
+				static const unsigned long SYSTEMMODEL_CLASS = 275535946;
 				static const unsigned int SYSTEMMODEL_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int SYSTEMMODEL_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int TRACE_CLASS = 137;
+				static const unsigned long TRACE_CLASS = 1903938062;
 				static const unsigned int TRACE_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int TRACE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int TYPE_CLASS = 63;
+				static const unsigned long TYPE_CLASS = 66837757;
 				static const unsigned int TYPE_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int TYPE_CLASS_OPERATION_COUNT = 0;

-				static const unsigned int UTILITY_CLASS = 8;
+				static const unsigned long UTILITY_CLASS = 995008667;
 				static const unsigned int UTILITY_CLASS_FEATURE_COUNT = 1;
 				static const unsigned int UTILITY_CLASS_OPERATION_COUNT = 0;


Close socket connection before returning from function (CID 80039)

--- src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
+++ src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
@@ -120,6 +120,7 @@
                   "Failed to Connect to remote device " << BluetoothDevice::GetUniqueDeviceId(
                     remoteSocketAddress.rc_bdaddr) << " for session " << this);
     *error = new ConnectError();
+    close(rfcomm_socket);
     LOG4CXX_TRACE(logger_, "exit with FALSE");
     return false;
   }


Update TridentTD_Ubidots.cpp

Update TridentTD_Ubidots.cpp

--- src/TridentTD_Ubidots.cpp
+++ src/TridentTD_Ubidots.cpp
@@ -185,7 +185,7 @@
   }

   if(currentValue>maxValues){
-    Serial.println(F("You are sending more than 5 consecutives variables, you just could send 5 variables. Then other variables will be deleted!"));
+    Serial.println(F("You are sending more than 5 consecutives variables, you just could send 10 variables. Then other variables will be deleted!"));
     currentValue = maxValues;
   }
 }
@@ -256,4 +256,4 @@

 String TridentTD_Ubidots::getVersion(){
   return _version;
-}+}


Fixed Comment Typo.

Fixed Comment Typo.

--- lib/inifile/iniFile.cpp
+++ lib/inifile/iniFile.cpp
@@ -165,7 +165,7 @@
 				break;
 			}
 		}  // switch (line[pLeft])
-	}  // while(getline(f, line))
+	}  // while(getline())

 	f.close();
 	if (names.size() == 0)


Whoops.

Whoops.

git-svn-id: 9d271b02f21ef92375d53f3a729673c5fe5e0adf@1994 5fc10e88-4e10-11de-b850-9977aa68d080

--- cpl/tabletop_pushing/src/tabletop_pushing_perception_node.cpp
+++ cpl/tabletop_pushing/src/tabletop_pushing_perception_node.cpp
@@ -1141,7 +1141,7 @@
     // cv::Mat cut = mgc_(color_frame_f_down, depth_frame_down, flows[0], flows[1],
     //                    flow_outs[1], workspace_mask_down);
     cv::Mat cut = mgc_(color_frame_f, depth_frame, flows[0], flows[1],
-                       flow_outs[1], workspace_mask_);
+                       flow_outs[1], cur_workspace_mask_);
     cv::Mat eroded_cut(cut.size(), cut.type());
     cv::Mat element(erosion_size_, erosion_size_, CV_32FC1, cv::Scalar(1.0));
     cv::erode(cut, eroded_cut, element);


Setup clustering of optical flow.

Setup clustering of optical flow.

git-svn-id: 9d271b02f21ef92375d53f3a729673c5fe5e0adf@2193 5fc10e88-4e10-11de-b850-9977aa68d080

--- cpl/tabletop_pushing/src/tabletop_pushing_perception_node.cpp
+++ cpl/tabletop_pushing/src/tabletop_pushing_perception_node.cpp
@@ -1060,23 +1060,124 @@
 class ObjectSingulation
 {
  public:
+  ObjectSingulation(int kmeans_max_iter=200, double kmeans_epsilon=0.5,
+                    int kmeans_tries=5) :
+      kmeans_max_iter_(kmeans_max_iter), kmeans_epsilon_(kmeans_epsilon),
+      kmeans_tries_(kmeans_tries)
+  {
+  }
+
   Pose2D getPushVector(cv::Mat& motion_mask, cv::Mat& arm_mask,
-                       cv::Mat& color_img, cv::Mat& depth_img)
+                       cv::Mat& color_img, cv::Mat& depth_img,
+                       cv::Mat& u, cv::Mat& v)
   {
     Pose2D push_dir;
-    cv::Mat boundary_img = getObjectBoundaryStrengths(motion_mask, arm_mask,
-                                                      color_img, depth_img);
-    // TODO: Find strongest border location, inside the region, find a pose
-    // parallel to it
+    // cv::Mat boundary_img = getObjectBoundaryStrengths(motion_mask, arm_mask,
+    //                                                   color_img, depth_img);
+    cv::Mat stuff_mask = motion_mask-arm_mask;
+    // Get flow clusters
+    std::vector<cv::Vec2f> centers = clusterFlowFields(u, v, stuff_mask);
+    // Determine push_direction based on centers and their directions
     return push_dir;
   }

+  Pose2D determinePushVector(std::vector<cv::Vec2f> centers)
+  {
+  }
+
   cv::Mat getObjectBoundaryStrengths(cv::Mat& motion_mask, cv::Mat& arm_mask,
                                      cv::Mat& color_img, cv::Mat& depth_img)
   {
     cv::Mat boundary_img(color_img.size(), CV_32FC1);
     return boundary_img;
   }
+
+  std::vector<cv::Vec2f> clusterFlowFields(cv::Mat& u, cv::Mat& v,
+                                           cv::Mat& mask, int max_k=2)
+  {
+    // Setup the samples as the flow vectors for the segmented moving region
+    int num_samples = 0;
+    for (int r = 0; r < mask.rows; ++r)
+    {
+      uchar* mask_row = mask.ptr<uchar>(r);
+      for (int c = 0; c < mask.cols; ++c)
+      {
+        if ( mask_row[c] != 0)
+        {
+          ++num_samples;
+        }
+      }
+    }
+    cv::Mat samples(num_samples, 2, CV_32FC1);
+    cv::Mat sample_locs(num_samples, 1, CV_32FC2);
+    for (int r = 0, i = 0; r < mask.rows; ++r)
+    {
+      uchar* mask_row = mask.ptr<uchar>(r);
+      for (int c = 0; c < mask.cols; ++c)
+      {
+        if ( mask_row[c] != 0)
+        {
+          samples.at<float>(i, 0) = u.at<float>(r,c);
+          samples.at<float>(i, 1) = v.at<float>(r,c);
+          sample_locs.at<cv::Vec2f>(i,0) = cv::Vec2f(r,c);
+          ++i;
+        }
+      }
+    }
+
+    // Perform kmeans clustering for a range of k values
+    std::vector<cv::Mat> labels;
+    std::vector<cv::Mat> centers;
+    double compactness[max_k];
+    cv::TermCriteria term_crit(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER,
+                               kmeans_max_iter_, kmeans_epsilon_);
+    for (int k = 1; k <= max_k; ++k)
+    {
+      cv::Mat labels_k;
+      cv::Mat centers_k;
+      double slack = cv::kmeans(samples, k, labels_k, term_crit, kmeans_tries_,
+                                cv::KMEANS_PP_CENTERS, centers_k);
+      compactness[k-1] = slack;
+      labels.push_back(labels_k);
+      centers.push_back(centers_k);
+    }
+
+    // TODO: Determine the best fitting clusters
+    // NOTE: The more cluster centers given should almost always fit with better
+    // confidence, thus we need to use some heuristic to determine if the flow
+    // centers have a significant angle between them comapred to the difference
+    // at fewer cluster centers
+    int best_k = max_k;
+
+    // Get the image location center matching the best fit flow clusters
+    std::vector<cv::Vec2f> cluster_centers;
+    for (int k = 0; k < max_k; ++k)
+    {
+      cv::Vec2f center_k(0,0);
+      int num_members = 0;
+      for (int i = 0; i < num_samples; ++i)
+      {
+        if (labels[best_k-1].at<uchar>(i,0) == k)
+        {
+          cv::Vec2f loc_i = sample_locs.at<cv::Vec2f>(i,0);
+          center_k += loc_i;
+          ++num_members;
+        }
+      }
+      center_k[0] = center_k[0]/num_members;
+      center_k[1] = center_k[1]/num_members;
+      cluster_centers.push_back(center_k);
+      cv::Vec2f flow_k;
+      flow_k[0] = centers[best_k-1].at<float>(k,0);
+      flow_k[1] = centers[best_k-1].at<float>(k,1);
+      cluster_centers.push_back(flow_k);
+    }
+    return cluster_centers;
+  }
+  // Class member variables
+  int kmeans_max_iter_;
+  double kmeans_epsilon_;
+  int kmeans_tries_;
 };

 class TabletopPushingPerceptionNode
@@ -1324,7 +1425,9 @@
         result.singulation_vector = os_.getPushVector(last_motion_mask_,
                                                       last_arm_mask_,
                                                       last_color_frame_,
-                                                      last_depth_frame_);
+                                                      last_depth_frame_,
+                                                      last_flow_u_,
+                                                      last_flow_v_);
       }
       track_server_.setSucceeded(result);
       // track_server_.setPreempted();
@@ -1464,6 +1567,8 @@
     arm_cut.copyTo(last_arm_mask_);
     color_frame_f.copyTo(last_color_frame_);
     depth_frame.copyTo(last_depth_frame_);
+    flow_outs[0].copyTo(last_flow_u_);
+    flow_outs[1].copyTo(last_flow_v_);

 #ifdef WRITE_INPUT_TO_DISK
     std::stringstream input_out_name;
@@ -2032,6 +2137,8 @@
   cv::Mat last_arm_mask_;
   cv::Mat last_color_frame_;
   cv::Mat last_depth_frame_;
+  cv::Mat last_flow_u_;
+  cv::Mat last_flow_v_;
   std_msgs::Header cur_camera_header_;
   std_msgs::Header prev_camera_header_;
   XYZPointCloud cur_point_cloud_;


object3d

--- src/rendering/object3d.cpp
+++ src/rendering/object3d.cpp
@@ -33,8 +33,8 @@
     rotateLocal(axis,angle);

     translateGlobal(-point);
-    mat4 rot = glm::rotate(mat4(),degreesToRadians(angle),axis);
-    position = vec3(rot*vec4(position,1));
+    quat qrot = glm::angleAxis(degreesToRadians(angle),axis);
+    position = vec3(qrot*vec4(position,1));
     translateGlobal(point);
 }


debug prints added

debug prints added

--- demo/desktop/vmf-player/MetadataProvider/MetadataProvider.cpp
+++ demo/desktop/vmf-player/MetadataProvider/MetadataProvider.cpp
@@ -263,6 +263,8 @@
         ::close(m_sock);
 #endif
         m_sock = -1;
+
+        std::cerr << "Socket closed" << std::endl;
     }
 }

@@ -530,5 +532,7 @@

     //set last timestamp
     m_lastTimestamp = ms.back()->getTime();
-}
-
+
+    std::cerr << "*** MetadataProvider::updateLocations() ***" << std::endl;
+}
+


Remove 'wrap_constructor'

Remove 'wrap_constructor'

--- lib/luwra/usertypes.hpp
+++ lib/luwra/usertypes.hpp
@@ -292,20 +292,6 @@
 		return 1;
 	}
 };
-
-/**
- * Constructor function for a type `T`. Variadic arguments must be used to specify which parameters
- * to use during construction.
- */
-template <typename T, typename... A>
-constexpr CFunction wrap_constructor =
-	&internal::construct_user_type<internal::StripUserType<T>, A...>;
-
-/**
- * This macros has no additional use whatsoever, but I makes the style consistent.
- */
-#define LUWRA_WRAP_CONSTRUCTOR(type, ...) \
-	(luwra::wrap_constructor<type, __VA_ARGS__>)

 /**
  * Property accessor method
@@ -382,6 +368,15 @@
 LUWRA_NS_END

 /**
+ * Generate a `lua_CFunction` wrapper for a constructor.
+ * \param type Type to instantiate
+ * \param ...  Constructor parameter types
+ * \return Wrapped function as `lua_CFunction`
+ */
+#define LUWRA_WRAP_CONSTRUCTOR(type, ...) \
+	(&luwra::internal::construct_user_type<luwra::internal::StripUserType<type>, __VA_ARGS__>)
+
+/**
  * Generate a `lua_CFunction` wrapper for a method.
  * \param fun Fully qualified method name (Do not supply a pointer)
  * \return Wrapped function as `lua_CFunction`


Compare functinos were broken.  Return value was bool, should have been int. Signed-off-by: Benjamin T. Drucker <benjamin.t.drucker@intel.com>

Compare functinos were broken.  Return value was bool, should have been int.
Signed-off-by: Benjamin T. Drucker <1d7ef7bb26a5cf1672681ced044dce14825e5c8f@intel.com>

--- lib/locale/meegolocale.cpp
+++ lib/locale/meegolocale.cpp
@@ -50,7 +50,7 @@
     };

-    bool compare (const QString & lStr, const QString & rStr, icu::Collator & coll)
+    int compare (const QString & lStr, const QString & rStr, icu::Collator & coll)
     {
         UnicodeString lUniStr = toUnicodeString(lStr);
         UnicodeString rUniStr = toUnicodeString(rStr);


compile

compile

Former-commit-id: c87b5834113030a53334a139052dd34680ac39ae

--- src/rpc/rawtransaction.cpp
+++ src/rpc/rawtransaction.cpp
@@ -180,13 +180,11 @@
             throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block hash not found");
         }
         in_active_chain = ::ChainActive().Contains(blockindex);
+    // SYSCOIN
     } else {
         uint32_t nBlockHeight;
         if(!pblockindexdb->ReadBlockHeight(hash, nBlockHeight)){
-
-            strError = strprintf("Can't find collateral blockhash %s in block index", hash.ToString());
-            LogPrint(BCLog::GOBJECT, "CGovernanceObject::IsCollateralValid -- %s\n", strError);
-            return false;
+            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block height not found in block index");
         }
         {
             LOCK(cs_main);


rpc: show both UTXOs in decodepsbt

rpc: show both UTXOs in decodepsbt

Former-commit-id: 4901ce9cf0d2628046900d765b984bb0a7891c58

--- src/rpc/rawtransaction.cpp
+++ src/rpc/rawtransaction.cpp
@@ -1109,6 +1109,7 @@
         const PSBTInput& input = psbtx.inputs[i];
         UniValue in(UniValue::VOBJ);
         // UTXOs
+        bool have_a_utxo = false;
         if (!input.witness_utxo.IsNull()) {
             const CTxOut& txout = input.witness_utxo;

@@ -1126,7 +1127,9 @@
             ScriptToUniv(txout.scriptPubKey, o, true);
             out.pushKV("scriptPubKey", o);
             in.pushKV("witness_utxo", out);
-        } else if (input.non_witness_utxo) {
+            have_a_utxo = true;
+        }
+        if (input.non_witness_utxo) {
             UniValue non_wit(UniValue::VOBJ);
             TxToUniv(*input.non_witness_utxo, uint256(), non_wit, false);
             in.pushKV("non_witness_utxo", non_wit);
@@ -1137,7 +1140,9 @@
                 // Hack to just not show fee later
                 have_all_utxos = false;
             }
-        } else {
+            have_a_utxo = true;
+        }
+        if (!have_a_utxo) {
             have_all_utxos = false;
         }


Use the correct loop variable

Use the correct loop variable

--- src/alignment_emitter.cpp
+++ src/alignment_emitter.cpp
@@ -716,7 +716,7 @@
         vector<Alignment> all;
         all.reserve(count);
         for (size_t i = 0; i < alns1_batch.size(); i++) {
-            for (size_t j = 0; i < alns1_batch[i].size(); j++) {
+            for (size_t j = 0; j < alns1_batch[i].size(); j++) {
                 all.emplace_back(std::move(alns1_batch[i][j]));
                 all.emplace_back(std::move(alns2_batch[i][j]));
             }
@@ -735,7 +735,7 @@
         stringstream data;
         for (size_t i = 0; i < alns1_batch.size(); i++) {
             assert(alns1_batch[i].size() == alns1_batch[i].size());
-            for (size_t j = 0; i < alns1_batch[i].size(); j++) {
+            for (size_t j = 0; j < alns1_batch[i].size(); j++) {
                 multiplexer.get_thread_stream(thread_number) << pb2json(alns1_batch[i][j]) << endl
                     << pb2json(alns2_batch[i][j]) << endl;
             }


halide_printf needs to return a nonzero value

Profiling.cpp assumes that successful calls to halide_printf return
nonzero values, but the Android implementation returns zero.

--- src/runtime/android_io.cpp
+++ src/runtime/android_io.cpp
@@ -17,7 +17,9 @@
     va_start(args,fmt);
     __android_log_vprint(7, "halide", fmt, args);
     va_end(args);
-    return 0;
+    // Profiler assumes that return value <=0 is failure,
+    // so return something else here.
+    return 1;
 }

 static bool write_stub(const void *bytes, size_t size, void *f) {


(#7834)  Fix memory leak.

(#7834)  Fix memory leak.

--- src/annex/BulkRequest.cpp
+++ src/annex/BulkRequest.cpp
@@ -123,6 +123,8 @@

 				free( tagValue );
 			}
+
+			free( buffer );
 		}

 		char * s = taglist.print_to_string();


Improve error message

Improve error message

--- src/api/ccapi/api_util.cc
+++ src/api/ccapi/api_util.cc
@@ -613,7 +613,7 @@

   if (certs == NULL || certstack == NULL) {
     AC_CERTS_free(certs);
-    seterror(VERR_SIGN, "AC does not contain certificate chain");
+    seterror(VERR_SIGN, "Malformed AC: the AC does not contain the issuer certificate chain");
     return NULL;
   }


script: Change SignatureHash input index check to an assert.

In the SignatureHash function, the input index must refer to a valid
index. This is not enforced equally in the segwit/non-segwit branches
and should be an assertion rather than returning a error hash.

--- src/script/interpreter.cpp
+++ src/script/interpreter.cpp
@@ -1172,6 +1172,8 @@

 uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const PrecomputedTransactionData* cache)
 {
+    assert(nIn < txTo.vin.size());
+
     if (sigversion == SIGVERSION_WITNESS_V0) {
         uint256 hashPrevouts;
         uint256 hashSequence;
@@ -1219,10 +1221,6 @@
     }

     static const uint256 one(uint256S("0000000000000000000000000000000000000000000000000000000000000001"));
-    if (nIn >= txTo.vin.size()) {
-        //  nIn out of range
-        return one;
-    }

     // Check for invalid use of SIGHASH_SINGLE
     if ((nHashType & 0x1f) == SIGHASH_SINGLE) {


fixed invalid imports with --gen-all (#5895)

* fixed invalid imports with --gen-all

* only excluding crate imports

Co-authored-by: Kamil Rojewski <e8d3f53346403578b24d8497b78729a0807df207@gmail.com>

--- src/idl_gen_rust.cpp
+++ src/idl_gen_rust.cpp
@@ -1786,14 +1786,17 @@
   void GenNamespaceImports(const int white_spaces) {
     std::string indent = std::string(white_spaces, ' ');
     code_ += "";
-    for (auto it = parser_.included_files_.begin();
-         it != parser_.included_files_.end(); ++it) {
-      if (it->second.empty()) continue;
-      auto noext = flatbuffers::StripExtension(it->second);
-      auto basename = flatbuffers::StripPath(noext);
-
-      code_ += indent + "use crate::" + basename + "_generated::*;";
-    }
+    if (!parser_.opts.generate_all) {
+      for (auto it = parser_.included_files_.begin();
+          it != parser_.included_files_.end(); ++it) {
+        if (it->second.empty()) continue;
+        auto noext = flatbuffers::StripExtension(it->second);
+        auto basename = flatbuffers::StripPath(noext);
+
+        code_ += indent + "use crate::" + basename + "_generated::*;";
+      }
+    }
+
     code_ += indent + "use std::mem;";
     code_ += indent + "use std::cmp::Ordering;";
     code_ += "";


INTEGRATION: CWS changefileheader (1.12.72); FILE MERGED 2008/03/31 12:22:41 rt 1.12.72.1: #i87441# Change license header to LPGL v3.

--- configmgr/source/backend/updatedata.cxx
+++ configmgr/source/backend/updatedata.cxx
@@ -1,35 +1,30 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
- *
- *  $RCSfile: updatedata.cxx,v $
- *
- *  $Revision: 1.12 $
- *
- *  last change: $Author: obo $ $Date: 2006-09-16 15:07:14 $
- *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
- *
- *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *    This library is free software; you can redistribute it and/or
- *    modify it under the terms of the GNU Lesser General Public
- *    License version 2.1, as published by the Free Software Foundation.
- *
- *    This library is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *    Lesser General Public License for more details.
- *
- *    You should have received a copy of the GNU Lesser General Public
- *    License along with this library; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *    MA  02111-1307  USA
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: updatedata.cxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
  *
  ************************************************************************/


Modified the printout statement for interpret and compile

interpret and compile now take in a symbol followed by a multifield. It may be
necessary to write a clips function to wrap over this to provide ease of use

--- lib/rampancy/Cortex.cpp
+++ lib/rampancy/Cortex.cpp
@@ -82,9 +82,11 @@
       DATA_OBJECT arg0;
       char* copy;
       copy = CharBuffer(512);
-      if((EnvArgCountCheck(theEnv, (char*)"compile", AT_LEAST, 1) == -1)) {
-         EnvPrintRouter(theEnv, (char*)"werror",
-               (char*)"\nNo compiler provided to use!\n");
+      if((EnvArgCountCheck(theEnv, (char*)"compile", EXACTLY, 2) == -1)) {
+         EnvPrintRouter(theEnv, (char*)"werror",
+               (char*)"\nCompile arguments are <compiler> <multifield>\n"
+                      "It may be necessary to wrap your input arguments in"
+                      "a create$ call.\n");
          return;
       }

@@ -112,9 +114,11 @@
       DATA_OBJECT arg0;
       char* copy;
       copy = CharBuffer(512);
-      if((EnvArgCountCheck(theEnv, (char*)"interpret", AT_LEAST, 1) == -1)) {
-         EnvPrintRouter(theEnv, (char*)"werror",
-              (char*) "\nNo compiler provided to use!\n");
+      if((EnvArgCountCheck(theEnv, (char*)"interpret", EXACTLY, 2) == -1)) {
+         EnvPrintRouter(theEnv, (char*)"werror",
+               (char*)"\nInterpret arguments are <compiler> <multifield>\n"
+                      "It may be necessary to wrap your input arguments in"
+                      "a create$ call.\n");
          return;
       }


Missing curly brace. compile++

Missing curly brace. compile++

--- gstreamer/streamreader.cpp
+++ gstreamer/streamreader.cpp
@@ -92,6 +92,7 @@
             // We didn't get any data, check if we are at the end of stream already.
             if (m_eos) {
                 return GST_FLOW_UNEXPECTED;
+            }
         }
     }
     if (m_mediaObject->state() != Phonon::BufferingState &&


Updated image reader so that it would throw an exception rather then returning a 0 pointer.

--- src/image_reader.cpp
+++ src/image_reader.cpp
@@ -84,7 +84,10 @@
     {
         return factory<image_reader,std::string,std::string const&>::instance().create_object(*type,filename);
     }
-    return 0;
+    else
+    {
+        throw image_reader_exception("image_reader: can't determine type from input data");
+    }
 }

 }


Consolidate GPU blacklist histograms into fewer ones.

Originally we have one for each feature, each OS platform (XP, Vista, Win7 as three).  Now we have one for each feature for all platforms, and one for each feature for Windows only (XP, Vista, and Win7 end up as different entries in one histogram).

BUG=91876
TEST=tree green
Review URL: http://codereview.chromium.org/7860012

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@101451 0039d316-1c4b-4281-b951-d872f2087c98

--- content/browser/gpu/gpu_data_manager.cc
+++ content/browser/gpu/gpu_data_manager.cc
@@ -61,6 +61,14 @@
 }

 #if defined(OS_WIN)
+enum WinSubVersion {
+  kWinOthers = 0,
+  kWinXP,
+  kWinVista,
+  kWin7,
+  kNumWinSubVersions
+};
+
 // Output DxDiagNode tree as nested array of {description,value} pairs
 ListValue* DxDiagNodeToList(const DxDiagNode& node) {
   ListValue* list = new ListValue();
@@ -81,37 +89,31 @@
   return list;
 }

+int GetGpuBlacklistHistogramValueWin(bool blocked) {
+  static WinSubVersion sub_version = kNumWinSubVersions;
+  if (sub_version == kNumWinSubVersions) {
+    sub_version = kWinOthers;
+    std::string version_str = base::SysInfo::OperatingSystemVersion();
+    size_t pos = version_str.find_first_not_of("0123456789.");
+    if (pos != std::string::npos)
+      version_str = version_str.substr(0, pos);
+    scoped_ptr<Version> os_version(Version::GetVersionFromString(version_str));
+    if (os_version.get() && os_version->components().size() >= 2) {
+      const std::vector<uint16>& version_numbers = os_version->components();
+      if (version_numbers[0] == 5)
+        sub_version = kWinXP;
+      else if (version_numbers[0] == 6 && version_numbers[1] == 0)
+        sub_version = kWinVista;
+      else if (version_numbers[0] == 6 && version_numbers[1] == 1)
+        sub_version = kWin7;
+    }
+  }
+  int entry_index = static_cast<int>(sub_version) * 2;
+  if (blocked)
+    entry_index++;
+  return entry_index;
+}
 #endif  // OS_WIN
-
-std::string GetOSString() {
-  std::string rt;
-#if defined(OS_CHROMEOS)
-  rt = "ChromeOS";
-#elif defined(OS_WIN)
-  rt = "Win";
-  std::string version_str = base::SysInfo::OperatingSystemVersion();
-  size_t pos = version_str.find_first_not_of("0123456789.");
-  if (pos != std::string::npos)
-    version_str = version_str.substr(0, pos);
-  scoped_ptr<Version> os_version(Version::GetVersionFromString(version_str));
-  if (os_version.get() && os_version->components().size() >= 2) {
-    const std::vector<uint16>& version_numbers = os_version->components();
-    if (version_numbers[0] == 5)
-      rt += "XP";
-    else if (version_numbers[0] == 6 && version_numbers[1] == 0)
-      rt += "Vista";
-    else if (version_numbers[0] == 6 && version_numbers[1] == 1)
-      rt += "7";
-  }
-#elif defined(OS_LINUX)
-  rt = "Linux";
-#elif defined(OS_MACOSX)
-  rt = "Mac";
-#else
-  rt = "UnknownOS";
-#endif
-  return rt;
-}

 }  // namespace anonymous

@@ -425,12 +427,18 @@
       GpuFeatureFlags::kGpuFeatureAcceleratedCompositing,
       GpuFeatureFlags::kGpuFeatureWebgl
   };
-  const std::string kOSString = GetOSString();
   const std::string kGpuBlacklistFeatureHistogramNames[] = {
-      "GPU.BlacklistAccelerated2dCanvasTestResults" + kOSString,
-      "GPU.BlacklistAcceleratedCompositingTestResults" + kOSString,
-      "GPU.BlacklistWebglTestResults" + kOSString
+      "GPU.BlacklistFeatureTestResults.Accelerated2dCanvas",
+      "GPU.BlacklistFeatureTestResults.AcceleratedCompositing",
+      "GPU.BlacklistFeatureTestResults.Webgl"
   };
+#if defined(OS_WIN)
+  const std::string kGpuBlacklistFeatureHistogramNamesWin[] = {
+      "GPU.BlacklistFeatureTestResultsWin.Accelerated2dCanvas",
+      "GPU.BlacklistFeatureTestResultsWin.AcceleratedCompositing",
+      "GPU.BlacklistFeatureTestResultsWin.Webgl"
+  };
+#endif
   const size_t kNumFeatures =
       sizeof(kGpuFeatures) / sizeof(GpuFeatureFlags::GpuFeatureType);
   for (size_t i = 0; i < kNumFeatures; ++i) {
@@ -440,6 +448,14 @@
         kGpuBlacklistFeatureHistogramNames[i], 1, 2, 3,
         base::Histogram::kUmaTargetedHistogramFlag);
     histogram_pointer->Add((flags & kGpuFeatures[i]) ? 1 : 0);
+#if defined(OS_WIN)
+    histogram_pointer = base::LinearHistogram::FactoryGet(
+        kGpuBlacklistFeatureHistogramNamesWin[i],
+        1, kNumWinSubVersions * 2, kNumWinSubVersions * 2 + 1,
+        base::Histogram::kUmaTargetedHistogramFlag);
+    histogram_pointer->Add(
+        GetGpuBlacklistHistogramValueWin(flags & kGpuFeatures[i]));
+#endif
   }
 }


fix overly long line

fix overly long line

--- contractor/edge_based_graph_factory.cpp
+++ contractor/edge_based_graph_factory.cpp
@@ -78,8 +78,8 @@
 }

 void
-EdgeBasedGraphFactory::InsertEdgeBasedNode(const NodeID node_u,
-                                           const NodeID node_v,
+EdgeBasedGraphFactory::InsertEdgeBasedNode(const NodeID node_u,
+                                           const NodeID node_v,
                                            const unsigned component_id)
 {
     // merge edges together into one EdgeBasedNode
@@ -389,10 +389,14 @@

             // update any involved turn restrictions
             m_restriction_map->FixupStartingTurnRestriction(node_u, node_v, node_w);
-            m_restriction_map->FixupArrivingTurnRestriction(node_u, node_v, node_w, m_node_based_graph);
+            m_restriction_map->FixupArrivingTurnRestriction(node_u, node_v,
+                                                            node_w,
+                                                            m_node_based_graph);

             m_restriction_map->FixupStartingTurnRestriction(node_w, node_v, node_u);
-            m_restriction_map->FixupArrivingTurnRestriction(node_w, node_v, node_u, m_node_based_graph);
+            m_restriction_map->FixupArrivingTurnRestriction(node_w,
+                                                            node_v,
+                                                            node_u, m_node_based_graph);

             // store compressed geometry in container
             m_geometry_compressor.CompressEdge(


Minor cleanup

Minor cleanup

--- gui/edge_graphics_item.cpp
+++ gui/edge_graphics_item.cpp
@@ -85,7 +85,6 @@
     QPolygonF arrowHead;
     arrowHead.clear();

-
     /// Pro zjednoduseni abychom nemuseli resit otaceni uhlu
     float arrowSize = -15;


Fix a combo box update issue

Fix a combo box update issue

Fix an update issue with combo boxes created without text entry, as reported on the forum (https://root.cern.ch/phpBB3/viewtopic.php?f=3&t=22554)

--- gui/gui/src/TGComboBox.cxx
+++ gui/gui/src/TGComboBox.cxx
@@ -449,10 +449,13 @@
          if (fSelEntry) {
             fSelEntry->Update(e);
             Layout();
-            if (emit) {
-               Selected(fWidgetId, id);
-               Selected(id);
-            }
+         } else if (fTextEntry && e->InheritsFrom(TGTextLBEntry::Class())) {
+            TGTextLBEntry *te = (TGTextLBEntry*)e;
+            fTextEntry->SetText(te->GetText()->GetString());
+         }
+         if (emit) {
+            Selected(fWidgetId, id);
+            Selected(id);
          }
       }
    }


Add --version

Add --version

--- src/shell_main_delegate.cc
+++ src/shell_main_delegate.cc
@@ -27,12 +27,16 @@
 #include "content/public/browser/browser_main_runner.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/url_constants.h"
-#include "content/shell/shell_browser_main.h"
-#include "content/shell/shell_content_browser_client.h"
-#include "content/shell/shell_content_renderer_client.h"
-#include "content/shell/shell_switches.h"
+#include "shell_browser_main.h"
+#include "shell_content_browser_client.h"
+#include "shell_content_renderer_client.h"
+#include "shell_switches.h"
+#include "third_party/node/src/node_version.h"
 #include "ui/base/resource/resource_bundle.h"
 #include "ui/base/ui_base_paths.h"
+#include "nw_version.h"
+
+#include <stdio.h>

 #if defined(OS_ANDROID)
 #include "base/global_descriptors_posix.h"
@@ -98,6 +102,13 @@
   // Enable trace control and transport through event tracing for Windows.
   logging::LogEventProvider::Initialize(kContentShellProviderName);
 #endif
+
+  // Print version and quit
+  if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kVersion)) {
+    printf("nw %s\nnode %s\n", NW_VERSION, NODE_VERSION);
+    *exit_code = 0;
+    return true;
+  }

   if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
     InitLogging();


Renaming logging macros and removing unnecessary ones

--- src/java_wrapper.cpp
+++ src/java_wrapper.cpp
@@ -4,11 +4,9 @@

 #ifdef ANDROID
 #include <android/log.h>
-#define  LOG_TAG    "ArrayFireJNI"
-#define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
-#define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
+#define  LOG(...)  __android_log_print(ANDROID_LOG_INFO, "ArrayFireJNI", __VA_ARGS__)
 #else
-#define LOGI(msg,...) do {                      \
+#define LOG(msg,...) do {                       \
     printf(__FILE__":%d: " msg "\n",            \
            __LINE__, ##__VA_ARGS__);            \
   } while (0)


nghttpx: Fix nghttp2 error code use in SPDY upstream

--- src/shrpx_spdy_upstream.cc
+++ src/shrpx_spdy_upstream.cc
@@ -642,14 +642,16 @@
     // stream, we don't have to do anything since response was
     // complete.
     if (downstream->get_upgraded()) {
-      rst_stream(downstream, NGHTTP2_NO_ERROR);
+      // We want "NO_ERROR" error code but SPDY does not have such
+      // code for RST_STREAM.
+      rst_stream(downstream, SPDYLAY_INTERNAL_ERROR);
     }
   } else {
     if (downstream->get_response_state() == Downstream::HEADER_COMPLETE) {
       if (downstream->get_upgraded()) {
         on_downstream_body_complete(downstream);
       } else {
-        rst_stream(downstream, NGHTTP2_INTERNAL_ERROR);
+        rst_stream(downstream, SPDYLAY_INTERNAL_ERROR);
       }
     } else {
       unsigned int status;


Declare MatrixHomogeneous as signal compatible type

	* src/signal/signal-cast.cpp.
w#

--- src/signal/signal-cast.cpp
+++ src/signal/signal-cast.cpp
@@ -18,10 +18,13 @@
  * with sot-core.  If not, see <http://www.gnu.org/licenses/>.
  */

+#include <dynamic-graph/signal-caster.h>
 #include <sot-core/pool.h>
 #include <sot-core/signal-cast.h>
 #include <iomanip>
 #include <sot-core/feature-abstract.h>
+
+#include "sot-core/matrix-homogeneous.h"

 using namespace std;
 using namespace sot;
@@ -88,4 +91,6 @@
 	SOT_SIGNAL_CAST_DECLARATION(Flags);
 	SOT_SIGNAL_CAST_DECLARATION(VectorMultiBound);
 	SOT_SIGNAL_CAST_DECLARATION(timeval );
+  dynamicgraph::DefaultCastRegisterer <sot::MatrixHomogeneous>
+  matrixHomegeneousCastRegisterer;
 }


modify variable name

modify variable name

--- src/simstring_database.hpp
+++ src/simstring_database.hpp
@@ -50,7 +50,8 @@
             const auto& indexed = columns[0];
             const auto& original = columns[1];

-            const auto& p = variants.insert(std::pair<string_type, std::vector<string_type>>(indexed, {original}));
+            const auto& p = originals.insert(std::pair<string_type,
+                    std::vector<string_type>>(indexed, {original}));
             if(!p.second){
                 p.first->second.push_back(original);
             }
@@ -77,7 +78,7 @@
             if(i.empty()){
                 continue;
             }
-            const auto& j = variants.at(i);
+            const auto& j = originals.at(i);
             std::copy(std::begin(j), std::end(j), std::back_inserter(result));
         }

@@ -93,7 +94,7 @@

     const std::shared_ptr<Indexer> index_func;

-    std::unordered_map<string_type, std::vector<string_type>> variants;
+    std::unordered_map<string_type, std::vector<string_type>> originals;
 };

 }


use capture context in mutable lambda to repserve past values so we average over interval since last use for SystemPerformance/Instruments/SystemCPU (windows only so far)

--- Library/Sources/Stroika/Frameworks/SystemPerformance/Instruments/SystemCPU.cpp
+++ Library/Sources/Stroika/Frameworks/SystemPerformance/Instruments/SystemCPU.cpp
@@ -159,32 +159,38 @@

 namespace {
-    Info capture_ ()
-    {
+    struct  CaptureContext_ {
+#if     qPlatform_Windows
+        Optional<WinSysTimeCaptureContext_> fContext_;
+#endif
+        Info capture_ ()
+        {
 #if     USE_NOISY_TRACE_IN_THIS_MODULE_
-        Debug::TraceContextBumper ctx ("Instruments::SystemCPU capture_");
-#endif
-        Info    result;
-#if     qSupport_SystemPerformance_Instruments_SystemCPU_LoadAverage
-        {
-            double loadAve[3];
-            int lr = ::getloadavg (loadAve, 3);
-            if (lr == 3) {
-                result.fLoadAverage = Info::LoadAverage (loadAve[0], loadAve[1], loadAve[2]);
+            Debug::TraceContextBumper ctx ("Instruments::SystemCPU capture_");
+#endif
+            Info    result;
+#if     qSupport_SystemPerformance_Instruments_SystemCPU_LoadAverage
+            {
+                double loadAve[3];
+                int lr = ::getloadavg (loadAve, 3);
+                if (lr == 3) {
+                    result.fLoadAverage = Info::LoadAverage (loadAve[0], loadAve[1], loadAve[2]);
+                }
+                else {
+                    DbgTrace ("getloadave failed - with result = %d", lr);
+                }
             }
-            else {
-                DbgTrace ("getloadave failed - with result = %d", lr);
-            }
-        }
 #endif
 #if     qPlatform_POSIX
-        //result.fTotalCPUUsage = cputime_ ();
+            //result.fTotalCPUUsage = cputime_ ();
 #elif     qPlatform_Windows
-        result.fTotalCPUUsage = cputime_ ();
-#endif
-
-        return result;
-    }
+            WinSysTimeCaptureContext_   tmp;
+            result.fTotalCPUUsage = cputime_ (fContext_, &tmp);
+            fContext_ = tmp;
+#endif
+            return result;
+        }
+    };
 }

@@ -198,13 +204,14 @@
  */
 Instrument  SystemPerformance::Instruments::SystemCPU::GetInstrument ()
 {
+    CaptureContext_ useCaptureContext;
     static  const   MeasurementType kSystemCPUMeasurment_         =   MeasurementType (String_Constant (L"System-CPU-Usage"));
     static  Instrument  kInstrument_    = Instrument (
             InstrumentNameType (String_Constant (L"System-CPU")),
-    [] () -> MeasurementSet {
+    [useCaptureContext] () mutable -> MeasurementSet {
         MeasurementSet    results;
         DateTime    before = DateTime::Now ();
-        Info rawMeasurement = capture_ ();
+        Info rawMeasurement = useCaptureContext.capture_ ();
         results.fMeasuredAt = DateTimeRange (before, DateTime::Now ());
         Measurement m;
         m.fValue = GetObjectVariantMapper ().FromObject (rawMeasurement);


iox-#415 Use timedWait() in ServiceDiscovery test

Signed-off-by: Simon Hoinkis <f0773326fce8fa552c28fe58d0e558a9f1b7687f@apex.ai>

--- iceoryx_posh/test/integrationtests/test_service_discovery.cpp
+++ iceoryx_posh/test/integrationtests/test_service_discovery.cpp
@@ -51,10 +51,7 @@
         searchResultOfFindServiceWithFindHandler.clear();
         callbackWasCalled = false;
         serviceContainer.clear();
-        m_watchdog.watchAndActOnFailure([] {
-            EXPECT_TRUE(false);
-            std::terminate();
-        });
+        m_watchdog.watchAndActOnFailure([] { std::terminate(); });
     }

     void TearDown() override
@@ -85,7 +82,7 @@
         callbackWasCalled = true;
     }

-    const iox::units::Duration m_fatalTimeout = 2_s;
+    const iox::units::Duration m_fatalTimeout = 5_s;
     Watchdog m_watchdog{m_fatalTimeout};
 };

@@ -644,7 +641,7 @@
     const iox::capro::ServiceDescription SERVICE_DESCRIPTION("Moep", "Fluepp", "Shoezzel");
     iox::popo::UntypedPublisher publisher(SERVICE_DESCRIPTION);

-    auto notificationVector = waitSet.wait();
+    auto notificationVector = waitSet.timedWait(1_s);

     for (auto& notification : notificationVector)
     {
@@ -669,7 +666,7 @@

     iox::popo::UntypedPublisher publisher(serviceDescriptionToSearchFor);

-    auto notificationVector = waitSet.wait();
+    auto notificationVector = waitSet.timedWait(1_s);

     for (auto& notification : notificationVector)
     {


COMP (#8896): made filename invalid for linux

--- Modules/IGT/Testing/mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
+++ Modules/IGT/Testing/mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
@@ -209,7 +209,7 @@
     MITK_TEST_CONDITION_REQUIRED(readStorage->isEmpty(),"Testing deserialization of invalid data storage.");
     MITK_TEST_CONDITION_REQUIRED(myDeserializer->GetErrorMessage() == "Cannot open 'noStorage.tfl' for reading", "Checking Error Message");
     }
-
+
     static void TestWriteStorageToInvalidFile()
     {
      //create Tool Storage
@@ -231,7 +231,7 @@
     mitk::NavigationToolStorageSerializer::Pointer mySerializer = mitk::NavigationToolStorageSerializer::New();

     //create filename
-    std::string filename = "dsfdsf:$$342INVALIDFILE.storage";
+    std::string filename = "/dsfdsf:$$342INVALIDFILE.storage";

     //test serialization
     bool success = mySerializer->Serialize(filename,myStorage);
@@ -256,4 +256,4 @@
   NavigationToolStorageSerializerAndDeserializerTestClass::CleanUp();

   MITK_TEST_END();
-}
+}


correct FSRProtection checking

correct FSRProtection checking

--- NaoTHSoccer/Source/Core/Motion/Engine/InverseKinematicsMotion/Motions/Walk.cpp
+++ NaoTHSoccer/Source/Core/Motion/Engine/InverseKinematicsMotion/Motions/Walk.cpp
@@ -80,18 +80,19 @@
   static unsigned int noTouchCount = 0;

   if ( theBlackBoard.theSupportPolygon.mode == SupportPolygon::NONE
-      && noTouchCount < theWalkParameters.minFSRProtectionCount )
+      && noTouchCount <= theWalkParameters.minFSRProtectionCount )
   {
     noTouchCount ++;
   }
-  else
-  {
-    noTouchCount = 0;
+  else if ( theBlackBoard.theSupportPolygon.mode != SupportPolygon::NONE
+           && noTouchCount > 0 )
+  {
+    noTouchCount --;
   }

   if ( !isStopping && canStop() )
   {
-    return noTouchCount >= theWalkParameters.minFSRProtectionCount;
+    return noTouchCount > theWalkParameters.minFSRProtectionCount;
   }
   else
   {


Bug 947055 - B2G NFC: NFC Daemon doesn't handle SNEP correctly

--- src/snep/SnepMessenger.cpp
+++ src/snep/SnepMessenger.cpp
@@ -35,9 +35,18 @@

   std::vector<uint8_t> buf;
   msg.toByteArray(buf);
-  uint32_t length = buf.size() <  mFragmentLength ? buf.size() : mFragmentLength;
-
-  mSocket->send(buf);
+  uint32_t length = -1;
+
+  if (buf.size() <  mFragmentLength) {
+    length = buf.size();
+    mSocket->send(buf);
+  } else {
+    length = mFragmentLength;
+    std::vector<uint8_t> tmpBuf;
+    for (uint32_t i = 0; i < mFragmentLength; i++)
+      tmpBuf.push_back(buf[i]);
+    mSocket->send(tmpBuf);
+  }

   if (length == buf.size()) {
     ALOGD("%s: exit", FUNC);


Perform the check for component.cereal also for named components (in case there are empty directories)

--- src/lib/annis/db.cpp
+++ src/lib/annis/db.cpp
@@ -260,25 +260,28 @@
                                                            namedComponentPath.filename().string()
                                        };

-
-            std::shared_ptr<ReadableGraphStorage> gsNamed;
-            if(preloadComponents)
+            auto inputFile = namedComponentPath / "component.cereal";
+
+            if(boost::filesystem::is_regular_file(inputFile))
             {
-              HL_DEBUG(logger, (boost::format("loading component %1%")
-                               % debugComponentString(namedComponent)).str());
-              auto inputFile = namedComponentPath / "component.cereal";
-              std::ifstream is(inputFile.string(), std::ios::binary);
-              if(is.is_open())
+              std::shared_ptr<ReadableGraphStorage> gsNamed;
+              if(preloadComponents)
               {
-                cereal::BinaryInputArchive ar(is);
-                ar(gsNamed);
+                HL_DEBUG(logger, (boost::format("loading component %1%")
+                                 % debugComponentString(namedComponent)).str());
+                std::ifstream is(inputFile.string(), std::ios::binary);
+                if(is.is_open())
+                {
+                  cereal::BinaryInputArchive ar(is);
+                  ar(gsNamed);
+                }
               }
-            }
-            else
-            {
-              notLoadedLocations.insert({namedComponent, namedComponentPath.string()});
-            }
-            graphStorages[namedComponent] = gsNamed;
+              else
+              {
+                notLoadedLocations.insert({namedComponent, namedComponentPath.string()});
+              }
+              graphStorages[namedComponent] = gsNamed;
+            } // end if components.cereal exists
           }
           itNamedComponents++;
         } // end for each file/directory in layer directory


Adopt better strategy to achieve TS

Adopt better strategy to achieve TS

    allowing the list of formula to update not only the names but also
    the hashes related to them.

--- hist/hist/src/TFormula.cxx
+++ hist/hist/src/TFormula.cxx
@@ -1057,7 +1057,7 @@
                   // case of :: (scopeOperator)
                   name.Append("::");
                   i+=2;
-                  continue;
+                  continue;
                }
                else
                   break;
@@ -1712,11 +1712,13 @@
       Error("SetName","The name \'%s\' is reserved as a TFormula variable name.\n"
          "\tThis function will not be renamed.",name);
    } else {
+      // Here we need to remove and re-add to keep the hashes consistent with
+      // the underlying names.
+      auto listOfFunctions = gROOT->GetListOfFunctions();
       R__LOCKGUARD2(gROOTMutex);
-      auto old = (TFormula*)gROOT->GetListOfFunctions()->FindObject(name);
-      if (old) {
-         old->SetName(name);
-      }
+      if (listOfFunctions) listOfFunctions->Remove(this);
+      fName = name;
+      if (listOfFunctions) listOfFunctions->Add(this);
    }
 }


Don’t check the `deriver` field on computeFSClosure

That doesn’t really make sense with CA derivations (and wasn’t even
really correct before because of FO derivations, though that probably
didn’t matter much in practice)

--- src/libstore/misc.cc
+++ src/libstore/misc.cc
@@ -30,7 +30,7 @@

             if (includeDerivers && path.isDerivation())
                 for (auto& [_, maybeOutPath] : queryPartialDerivationOutputMap(path))
-                    if (maybeOutPath && isValidPath(*maybeOutPath) && queryPathInfo(*maybeOutPath)->deriver == path)
+                    if (maybeOutPath && isValidPath(*maybeOutPath))
                         res.insert(*maybeOutPath);
             return res;
         };


Fix a problem in replacing x -> x[0]  on all platforms

--- hist/hist/src/TFormula.cxx
+++ hist/hist/src/TFormula.cxx
@@ -397,7 +397,8 @@
    {
       TString var = defvarsNames[i];
       Double_t value = 0;
-      fVars[var] = TFormulaVariable(var,value,fVars.size());
+      unsigned int size = fVars.size();
+      fVars[var] = TFormulaVariable(var,value,size);
       fClingVariables.push_back(value);
    }


update h file

update h file

--- src/main/preqclr.hpp
+++ src/main/preqclr.hpp
@@ -11,6 +11,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "sequence.hpp"
+#include "contig.hpp"

 #include "readpaf/paf.h"

@@ -30,12 +31,14 @@
 void calculate_read_length( vector <pair <double, int>> fq, JSONWriter* writer);
 void calculate_GC_content( vector <pair <double, int>> fq, JSONWriter* writer);
 void calculate_tot_bases( map<string, sequence> paf, JSONWriter* writer);
-void calculate_ngx( vector<double> contig_lengths, double genome_size_est, JSONWriter* writer);
+void calculate_ngx( map<string, contig> contigs, double genome_size_est, JSONWriter* writer);
 void calculate_total_num_bases_vs_min_cov( map<double, long long int, greater<double>> per_cov_total_num_bases, JSONWriter* writer);
+void calculate_repetitivity(map<string, contig> ctg, double g, int n, JSONWriter* writer );
+map<string, contig> calculate_ctgs();

 int getopt( int argc, char* const* argv[], const char *optstring);
 enum { OPT_VERSION, OPT_KEEP_LOW_COV, OPT_KEEP_HIGH_COV, OPT_KEEP_DUPS, OPT_REMOVE_INT_MATCHES, OPT_MAX_OVERHANG, OPT_MAX_OVERHANG_RATIO, OPT_REMOVE_CONTAINED, OPT_PRINT_READ_COV, OPT_KEEP_SELF_OVERLAPS, OPT_PRINT_GSE_STAT, OPT_PRINT_NEW_PAF };
 void parse_args( int argc, char *argv[]);
 map<string, sequence> parse_paf();
-vector<double> parse_gfa();
+void parse_gfa(map<string, contig> ctgs);
 vector<pair<double,int>> parse_fq( string readsFile );


libTidyEngine: Fixed exception handling

libTidyEngine: Fixed exception handling

--- libTidyEngine/error.hpp
+++ libTidyEngine/error.hpp
@@ -34,8 +34,8 @@
 		text = s;
 	}

-	virtual const char *what()
-	{
+	virtual const char *what() const
+        {
 		return text.c_str();
 	}
 private:


Check for error packet while doing handshake

If an error packet is received instead of the
expected handshake packet the function returns
DRIZZLE_RETURN_ERROR_CODE

Addresses #120

--- libdrizzle/handshake.cc
+++ libdrizzle/handshake.cc
@@ -99,7 +99,11 @@
     return DRIZZLE_RETURN_OK;
   }

-  if (con->packet_size < 46)
+  if (drizzle_check_unpack_error(con))
+  {
+    return DRIZZLE_RETURN_ERROR_CODE;
+  }
+  else if (con->packet_size < 46)
   {
     drizzle_set_error(con, __func__,
                       "bad packet size:>=46:%" PRIu32, con->packet_size);


LLL: add bytecodesize keyword to push resulting bytecode size

--- liblll/CodeFragment.cpp
+++ liblll/CodeFragment.cpp
@@ -581,6 +581,10 @@
 		{
 			m_asm.appendJump(m_asm.errorTag());
 		}
+		else if (us == "BYTECODESIZE")
+		{
+			m_asm.appendProgramSize();
+		}
 		else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_-") == string::npos)
 			m_asm.append((u256)varAddress(s));
 		else


Fix to call to stop interval timer.

Fix to call to stop interval timer.

git-svn-id: 98787b36aaefbae4b30fa755be920954cd25e1e4@61 ae7d391e-3f74-4a2b-a0db-a8776840fd2a

--- libpolyml/processes.cpp
+++ libpolyml/processes.cpp
@@ -1346,7 +1346,9 @@
     }
     else if (timerRunning)
     { // Stop the timer.
-        setitimer(ITIMER_REAL, 0, 0);
+        struct itimerval cancelTimer;
+        memset(&cancelTimer, 0, sizeof(cancelTimer));
+        setitimer(ITIMER_REAL, &cancelTimer, 0);
         timerRunning = false;
     }
 #endif
@@ -1398,7 +1400,9 @@
     hStopEvent = NULL;
 #else
     // Stop the timer.  We mustn't get any interrupts from now on.
-    setitimer(ITIMER_REAL, 0, 0);
+    struct itimerval cancelTimer;
+    memset(&cancelTimer, 0, sizeof(cancelTimer));
+    setitimer(ITIMER_REAL, &cancelTimer, 0);
 #endif
 }