Adding explicit check for opening the burn account in utx blocks.

--- rai/ledger.cpp
+++ rai/ledger.cpp
@@ -182,85 +182,90 @@
 		result.code = validate_message (block_a.hashables.account, hash, block_a.signature) ? rai::process_result::bad_signature : rai::process_result::progress; // Is this block signed correctly (Unambiguous)
 		if (result.code == rai::process_result::progress)
 		{
-			rai::account_info info;
-			result.amount = block_a.hashables.balance;
-			bool is_send (false);
-			auto account_error (ledger.store.account_get (transaction, block_a.hashables.account, info));
-			if (!account_error)
+			result.code = block_a.hashables.account.is_zero () ? rai::process_result::opened_burn_account : rai::process_result::progress; // Is this for the burn account? (Unambiguous)
+			if (result.code == rai::process_result::progress)
 			{
-				// Account already exists
-				result.code = block_a.hashables.previous.is_zero () ? rai::process_result::fork : rai::process_result::progress; // Has this account already been opened? (Ambigious)
+				rai::account_info info;
+				result.amount = block_a.hashables.balance;
+				auto is_send (false);
+				auto account_error (ledger.store.account_get (transaction, block_a.hashables.account, info));
+				if (!account_error)
+				{
+					// Account already exists
+					result.code = block_a.hashables.previous.is_zero () ? rai::process_result::fork : rai::process_result::progress; // Has this account already been opened? (Ambigious)
+					if (result.code == rai::process_result::progress)
+					{
+						result.code = ledger.store.block_exists (transaction, block_a.hashables.previous) ? rai::process_result::progress : rai::process_result::gap_previous; // Does the previous block exist in the ledger? (Unambigious)
+						if (result.code == rai::process_result::progress)
+						{
+							is_send = block_a.hashables.balance < info.balance;
+							result.amount = result.amount.number () - info.balance.number ();
+							result.code = block_a.hashables.previous == info.head ? rai::process_result::progress : rai::process_result::fork; // Is the previous block the account's head block? (Ambigious)
+						}
+					}
+				}
+				else
+				{
+					// Account does not yet exists
+					result.code = block_a.previous ().is_zero () ? rai::process_result::progress : rai::process_result::gap_previous; // Does the first block in an account yield 0 for previous() ? (Unambigious)
+				}
 				if (result.code == rai::process_result::progress)
 				{
-					result.code = ledger.store.block_exists (transaction, block_a.hashables.previous) ? rai::process_result::progress : rai::process_result::gap_previous; // Does the previous block exist in the ledger? (Unambigious)
-					if (result.code == rai::process_result::progress)
-					{
-						is_send = block_a.hashables.balance < info.balance;
-						result.amount = result.amount.number () - info.balance.number ();
-						result.code = block_a.hashables.previous == info.head ? rai::process_result::progress : rai::process_result::fork; // Is the previous block the account's head block? (Ambigious)
-					}
-				}
-			}
-			else
-			{
-				// Account does not yet exists
-				result.code = block_a.previous ().is_zero () ? rai::process_result::progress : rai::process_result::gap_previous; // Does the first block in an account yield 0 for previous() ? (Unambigious)
-			}
-			result.utx_is_send = is_send;
-			if (result.code == rai::process_result::progress)
-			{
-				if (!is_send)
-				{
-					if (!block_a.hashables.link.is_zero ())
-					{
-						result.code = ledger.store.block_exists (transaction, block_a.hashables.link) ? rai::process_result::progress : rai::process_result::gap_source; // Have we seen the source block already? (Harmless)
-						if (result.code == rai::process_result::progress)
+					if (!is_send)
+					{
+						if (!block_a.hashables.link.is_zero ())
 						{
-							rai::pending_key key (block_a.hashables.account, block_a.hashables.link);
-							rai::pending_info pending;
-							result.code = ledger.store.pending_get (transaction, key, pending) ? rai::process_result::unreceivable : rai::process_result::progress; // Has this source already been received (Malformed)
+							result.code = ledger.store.block_exists (transaction, block_a.hashables.link) ? rai::process_result::progress : rai::process_result::gap_source; // Have we seen the source block already? (Harmless)
 							if (result.code == rai::process_result::progress)
 							{
-								result.code = result.amount == pending.amount ? rai::process_result::progress : rai::process_result::balance_mismatch;
+								rai::pending_key key (block_a.hashables.account, block_a.hashables.link);
+								rai::pending_info pending;
+								result.code = ledger.store.pending_get (transaction, key, pending) ? rai::process_result::unreceivable : rai::process_result::progress; // Has this source already been received (Malformed)
+								if (result.code == rai::process_result::progress)
+								{
+									result.code = result.amount == pending.amount ? rai::process_result::progress : rai::process_result::balance_mismatch;
+								}
 							}
 						}
-					}
-					else
-					{
-						result.code = result.amount.is_zero () ? rai::process_result::progress : rai::process_result::balance_mismatch;
+						else
+						{
+							// If there's no link, the balance must remain the same, only the representative can change
+							result.code = result.amount.is_zero () ? rai::process_result::progress : rai::process_result::balance_mismatch;
+						}
 					}
 				}
-			}
-			if (result.code == rai::process_result::progress)
-			{
-				ledger.store.block_put (transaction, hash, block_a);
-
-				if (!info.rep_block.is_zero ())
+				if (result.code == rai::process_result::progress)
 				{
-					// Move existing representation
-					ledger.store.representation_add (transaction, info.rep_block, 0 - info.balance.number ());
+					result.utx_is_send = is_send;
+					ledger.store.block_put (transaction, hash, block_a);
+
+					if (!info.rep_block.is_zero ())
+					{
+						// Move existing representation
+						ledger.store.representation_add (transaction, info.rep_block, 0 - info.balance.number ());
+					}
+					// Add in amount delta
+					ledger.store.representation_add (transaction, hash, block_a.hashables.balance.number ());
+
+					if (is_send)
+					{
+						rai::pending_key key (block_a.hashables.link, hash);
+						rai::pending_info info (block_a.hashables.account, 0 - result.amount.number ());
+						ledger.store.pending_put (transaction, key, info);
+					}
+					else if (!block_a.hashables.link.is_zero ())
+					{
+						ledger.store.pending_del (transaction, rai::pending_key (block_a.hashables.account, block_a.hashables.link));
+					}
+
+					ledger.change_latest (transaction, block_a.hashables.account, hash, hash, block_a.hashables.balance, info.block_count + 1);
+					if (!ledger.store.frontier_get (transaction, info.head).is_zero ())
+					{
+						ledger.store.frontier_del (transaction, info.head);
+					}
+					// Frontier table is unnecessary for utx blocks and this also prevents old blocks from being inserted on top of utx blocks
+					result.account = block_a.hashables.account;
 				}
-				// Add in amount delta
-				ledger.store.representation_add (transaction, hash, block_a.hashables.balance.number ());
-
-				if (is_send)
-				{
-					rai::pending_key key (block_a.hashables.link, hash);
-					rai::pending_info info (block_a.hashables.account, 0 - result.amount.number ());
-					ledger.store.pending_put (transaction, key, info);
-				}
-				else if (!block_a.hashables.link.is_zero ())
-				{
-					ledger.store.pending_del (transaction, rai::pending_key (block_a.hashables.account, block_a.hashables.link));
-				}
-
-				ledger.change_latest (transaction, block_a.hashables.account, hash, hash, block_a.hashables.balance, info.block_count + 1);
-				if (!ledger.store.frontier_get (transaction, info.head).is_zero ())
-				{
-					ledger.store.frontier_del (transaction, info.head);
-				}
-				// Frontier table is unnecessary for utx blocks and this also prevents old blocks from being inserted on top of utx blocks
-				result.account = block_a.hashables.account;
 			}
 		}
 	}


Fix potential seh in eclminus

Fix potential seh in eclminus

Reduce the lifetime of the error interface to prevent problems in
destructor when a local variable is passed to create a file collection.
Spotted when running eclminus - could possibly occur in other
situations.

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

--- ecl/hql/hqlcollect.cpp
+++ ecl/hql/hqlcollect.cpp
@@ -190,8 +190,8 @@
 class FileSystemEclCollection : public CEclSourceCollection
 {
 public:
-    FileSystemEclCollection(IErrorReceiver * _errs, unsigned _trace)
-        : root(NULL, NULL), errs(_errs), trace(_trace)
+    FileSystemEclCollection(unsigned _trace)
+        : root(NULL, NULL), trace(_trace)
     {
     }

@@ -200,10 +200,9 @@
     virtual IEclSourceIterator * getContained(IEclSource * optParent);
     virtual void checkCacheValid();

-    void processFilePath(const char * sourceSearchPath, bool allowPlugins);
-
-public:
-    Linked<IErrorReceiver> errs;
+    void processFilePath(IErrorReceiver * errs, const char * sourceSearchPath, bool allowPlugins);
+
+public:
     FileSystemDirectory root;
     unsigned trace;
 };
@@ -428,7 +427,7 @@
     return parent->getContained();
 }

-void FileSystemEclCollection::processFilePath(const char * sourceSearchPath, bool allowPlugins)
+void FileSystemEclCollection::processFilePath(IErrorReceiver * errs, const char * sourceSearchPath, bool allowPlugins)
 {
     if (!sourceSearchPath)
         return;
@@ -488,8 +487,8 @@

 extern HQL_API IEclSourceCollection * createFileSystemEclCollection(IErrorReceiver *errs, const char * path, unsigned flags, unsigned trace)
 {
-    Owned<FileSystemEclCollection> collection = new FileSystemEclCollection(errs, trace);
-    collection->processFilePath(path, (flags & ESFallowplugins) != 0);
+    Owned<FileSystemEclCollection> collection = new FileSystemEclCollection(trace);
+    collection->processFilePath(errs, path, (flags & ESFallowplugins) != 0);
     return collection.getClear();
 }


Account for shadow textures in TerrainMaterialGeneratorA::SM2Profile::getMaxLayers

--- Components/Terrain/src/OgreTerrainMaterialGeneratorA.cpp
+++ Components/Terrain/src/OgreTerrainMaterialGeneratorA.cpp
@@ -202,7 +202,15 @@
 		// colourmap
 		if (terrain->getGlobalColourMapEnabled())
 			--freeTextureUnits;
-		// TODO shadowmaps
+		if (isShadowingEnabled(HIGH_LOD, terrain))
+		{
+			uint numShadowTextures = 1;
+			if (getReceiveDynamicShadowsPSSM())
+			{
+				numShadowTextures = getReceiveDynamicShadowsPSSM()->getSplitCount();
+			}
+			freeTextureUnits -= numShadowTextures;
+		}

 		// each layer needs 2.25 units (1xdiffusespec, 1xnormalheight, 0.25xblend)
 		return static_cast<uint8>(freeTextureUnits / 2.25f);


Fix bug 295: automatically disable normal & parallax mapping on cards that cannot support it

--- Components/Terrain/src/OgreTerrainMaterialGeneratorA.cpp
+++ Components/Terrain/src/OgreTerrainMaterialGeneratorA.cpp
@@ -237,6 +237,16 @@
 		}
 		// clear everything
 		mat->removeAllTechniques();
+
+		// Automatically disable normal & parallax mapping if card cannot handle it
+		// We do this rather than having a specific technique for it since it's simpler
+		GpuProgramManager& gmgr = GpuProgramManager::getSingleton();
+		if (!gmgr.isSyntaxSupported("ps_3_0") && !gmgr.isSyntaxSupported("ps_2_x")
+			&& !gmgr.isSyntaxSupported("fp40"))
+		{
+			setLayerNormalMappingEnabled(false);
+			setLayerParallaxMappingEnabled(false);
+		}

 		addTechnique(mat, terrain, HIGH_LOD);


INTEGRATION: CWS changefileheader (1.18.60); FILE MERGED 2008/04/01 15:04:20 thb 1.18.60.3: #i85898# Stripping all external header guards 2008/04/01 10:50:35 thb 1.18.60.2: #i85898# Stripping all external header guards 2008/03/28 16:44:12 rt 1.18.60.1: #i87441# Change license header to LPGL v3.

--- chart2/source/model/template/ChartTypeTemplate.cxx
+++ chart2/source/model/template/ChartTypeTemplate.cxx
@@ -1,35 +1,30 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- *  $RCSfile: ChartTypeTemplate.cxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
  *
- *  $Revision: 1.19 $
+ * OpenOffice.org - a multi-platform office productivity suite
  *
- *  last change: $Author: kz $ $Date: 2008-04-04 10:59:39 $
+ * $RCSfile: ChartTypeTemplate.cxx,v $
+ * $Revision: 1.20 $
  *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
+ * 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.
  *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ * 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).
  *
- *    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
+ * 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.
  *
  ************************************************************************/

@@ -51,30 +46,13 @@
 #include "DiagramHelper.hxx"
 #include "ChartDebugTrace.hxx"
 #include "AxisIndexDefines.hxx"
-
-#ifndef _CPPUHELPER_COMPONENT_CONTEXT_HXX_
 #include <cppuhelper/component_context.hxx>
-#endif
-
-#ifndef _COM_SUN_STAR_CHART_CHARTSOLIDTYPE_HPP_
 #include <com/sun/star/chart/ChartSolidType.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_CHART2_AXISTYPE_HPP_
 #include <com/sun/star/chart2/AxisType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CHART2_XDATASERIESCONTAINER_HPP_
 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPECONTAINER_HPP_
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CHART2_AXISPOSITION_HPP_
 #include <com/sun/star/chart2/AxisPosition.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CHART2_AXISTYPE_HPP_
 #include <com/sun/star/chart2/AxisType.hpp>
-#endif

 #include <algorithm>
 #include <iterator>


fix our backup stuff, notify the user on failures, stuff like: oh my disk is full, kate eaten my file should never happen again, beside if the user forces kate to do so, but, huw, ...

svn path=/trunk/KDE/kdelibs/kate/; revision=590056

--- part/part/katedocument.cpp
+++ part/part/katedocument.cpp
@@ -2517,8 +2517,10 @@

 bool KateDocument::save()
 {
+  // local file or not is here the question
   bool l ( url().isLocalFile() );

+  // does the user want any backup, if not, not our problem?
   if ( ( l && config()->backupFlags() & KateDocumentConfig::LocalFiles )
        || ( ! l && config()->backupFlags() & KateDocumentConfig::RemoteFiles ) )
   {
@@ -2528,27 +2530,47 @@
     kDebug () << "backup src file name: " << url() << endl;
     kDebug () << "backup dst file name: " << u << endl;

-    // get the right permissions, start with safe default
-    mode_t  perms = 0600;
-    KIO::UDSEntry fentry;
-    if (KIO::NetAccess::stat (url(), fentry, kapp->activeWindow()))
-    {
-      kDebug () << "stating succesfull: " << url() << endl;
-      KFileItem item (fentry, url());
-      perms = item.permissions();
-    }
-
-    // first del existing file if any, than copy over the file we have
-    // failure if a: the existing file could not be deleted, b: the file could not be copied
-    if ( (!KIO::NetAccess::exists( u, false, kapp->activeWindow() ) || KIO::NetAccess::del( u, kapp->activeWindow() ))
-          && KIO::NetAccess::file_copy( url(), u, perms, true, false, kapp->activeWindow() ) )
-    {
-      kDebug(13020)<<"backing up successful ("<<url().prettyUrl()<<" -> "<<u.prettyUrl()<<")"<<endl;
-    }
-    else
-    {
-      kDebug(13020)<<"backing up failed ("<<url().prettyUrl()<<" -> "<<u.prettyUrl()<<")"<<endl;
-      // FIXME: notify user for real ;)
+    // handle the backup...
+    bool backupSuccess = false;
+
+    // local file mode, no kio
+    if (u.isLocalFile ())
+    {
+      // first: check if backupFile is already there, if true, unlink it
+      QFile backupFile (u.toLocalFile ());
+      if (backupFile.exists()) backupFile.remove ();
+
+      backupSuccess = QFile::copy (url().toLocalFile (), u.toLocalFile ());
+    }
+    else // remote file mode, kio
+    {
+      QWidget *w = widget ();
+      if (!w && !m_views.isEmpty ())
+        w = m_views.first();
+
+      // get the right permissions, start with safe default
+      mode_t  perms = 0600;
+      KIO::UDSEntry fentry;
+      if (KIO::NetAccess::stat (url(), fentry, kapp->activeWindow()))
+      {
+        kDebug () << "stating succesfull: " << url() << endl;
+        KFileItem item (fentry, url());
+        perms = item.permissions();
+      }
+
+      // do a evil copy which will overwrite target if possible
+      backupSuccess = KIO::NetAccess::file_copy ( url(), u, -1, true, false, w );
+    }
+
+    // backup has failed, ask user how to proceed
+    if (!backupSuccess && (KMessageBox::warningContinueCancel (widget()
+        , i18n ("For file %1 no backup copy could be created before saving."
+                " If the there occurs an error while saving, you might loose the data of this file."
+                " A reason could be, that the media you write to is full or the directory of the file is read-only for you.", url().url())
+        , i18n ("Failed to create backup copy.")
+        , KGuiItem(i18n("Try to Save Nevertheless")), "Backup Failed Warning") != KMessageBox::Continue))
+    {
+      return false;
     }
   }


Minor styling fix. NFC.

Minor styling fix. NFC.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@366456 91177308-0d34-0410-b5e6-96231b3b80d8

--- unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
+++ unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
@@ -949,8 +949,7 @@
   for (int I = 0; I != 2; ++I)
     Merge2Ops.push_back(B.buildConstant(S8, I).getReg(0));

-    auto Merge2 = B.buildMerge(S16, Merge2Ops);
-
+  auto Merge2 = B.buildMerge(S16, Merge2Ops);

   EXPECT_EQ(LegalizerHelper::LegalizeResult::Legalized,
             Helper.widenScalar(*Merge0, 1, S9));


INTEGRATION: CWS visibility03 (1.2.34); FILE MERGED 2005/02/28 04:33:53 mnicel 1.2.34.1: Issue number:  40092 Part of visibility work

--- unotools/inc/unotools/desktopterminationobserver.hxx
+++ unotools/inc/unotools/desktopterminationobserver.hxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: desktopterminationobserver.hxx,v $
  *
- *  $Revision: 1.2 $
+ *  $Revision: 1.3 $
  *
- *  last change: $Author: rt $ $Date: 2004-07-06 13:13:37 $
+ *  last change: $Author: obo $ $Date: 2005-04-13 12:25:30 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -58,6 +58,9 @@
  *
  *
  ************************************************************************/
+#ifndef INCLUDED_UNOTOOLSDLLAPI_H
+#include "unotools/unotoolsdllapi.h"
+#endif

 #ifndef UNOTOOLS_INC_UNOTOOLS_DESKTOPTERMINATIONOBSERVER_HXX
 #define UNOTOOLS_INC_UNOTOOLS_DESKTOPTERMINATIONOBSERVER_HXX
@@ -88,7 +91,7 @@
     /** a class which allows non-UNO components to observe the desktop (aka application)
         for it's shutdown
     */
-    class DesktopTerminationObserver
+    class UNOTOOLS_DLLPUBLIC DesktopTerminationObserver
     {
     public:
         /** registers a listener which should be notified when the desktop terminates


Fix doc theme not changing when its hidding

(cherry picked from commit 9a5cce35e609adb42dce4a5217ac41cbb609441f)

--- editor/editor_help.cpp
+++ editor/editor_help.cpp
@@ -1456,7 +1456,7 @@
 			_update_doc();
 		} break;
 		case NOTIFICATION_THEME_CHANGED: {
-			if (is_visible_in_tree()) {
+			if (is_inside_tree()) {
 				_class_desc_resized();
 			}
 		} break;


Run project after selecting main scene. Fixes #9077

--- editor/editor_node.cpp
+++ editor/editor_node.cpp
@@ -1085,6 +1085,7 @@
 			GlobalConfig::get_singleton()->set("application/main_scene", p_file);
 			GlobalConfig::get_singleton()->save();
 			//would be nice to show the project manager opened with the highlighted field..
+			_run(false, ""); // automatically run the project
 		} break;
 		case FILE_SAVE_OPTIMIZED: {


Localize unnamed project name in editor window title

--- editor/editor_node.cpp
+++ editor/editor_node.cpp
@@ -416,7 +416,7 @@

 void EditorNode::_update_title() {
 	const String appname = ProjectSettings::get_singleton()->get("application/config/name");
-	String title = (appname.is_empty() ? "Unnamed Project" : appname) + String(" - ") + VERSION_NAME;
+	String title = (appname.is_empty() ? TTR("Unnamed Project") : appname) + String(" - ") + VERSION_NAME;
 	const String edited = editor_data.get_edited_scene_root() ? editor_data.get_edited_scene_root()->get_scene_file_path() : String();
 	if (!edited.is_empty()) {
 		// Display the edited scene name before the program name so that it can be seen in the OS task bar.


Tweak the invalid preset error message to mention `export_presets.cfg`

(cherry picked from commit a7b2f3d41aa47d64ad783d5afb35d08e706bf8ea)

--- editor/editor_node.cpp
+++ editor/editor_node.cpp
@@ -593,7 +593,9 @@
 			preset.unref();
 		}
 		if (preset.is_null()) {
-			export_error = vformat("Invalid export preset name: %s.", preset_name);
+			export_error = vformat(
+					"Invalid export preset name: %s. Make sure `export_presets.cfg` is present in the current directory.",
+					preset_name);
 		} else {
 			Ref<EditorExportPlatform> platform = preset->get_platform();
 			if (platform.is_null()) {


Fix "editor/editor_help" shortcut overwriting when restarting editor

--- editor/editor_node.cpp
+++ editor/editor_node.cpp
@@ -6265,7 +6265,7 @@

 	p = help_menu->get_popup();
 	p->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
-	p->add_icon_shortcut(gui_base->get_theme_icon("HelpSearch", "EditorIcons"), ED_SHORTCUT("editor/editor_help", TTR("Search"), KEY_MASK_SHIFT | KEY_F1), HELP_SEARCH);
+	p->add_icon_shortcut(gui_base->get_theme_icon("HelpSearch", "EditorIcons"), ED_SHORTCUT("editor/editor_help", TTR("Search")), HELP_SEARCH);
 	p->add_separator();
 	p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/online_docs", TTR("Online Docs")), HELP_DOCS);
 	p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/q&a", TTR("Q&A")), HELP_QA);


Fixed null editor icon crash

Fixed null editor icon crash

Fixes #24932

--- editor/editor_path.cpp
+++ editor/editor_path.cpp
@@ -119,9 +119,10 @@

 				Ref<Texture> icon = EditorNode::get_singleton()->get_object_icon(obj);

-				icon->draw(ci, Point2i(ofs, (size.height - icon->get_height()) / 2));
-
-				ofs += icon->get_width();
+				if (icon.is_valid()) {
+					icon->draw(ci, Point2i(ofs, (size.height - icon->get_height()) / 2));
+					ofs += icon->get_width();
+				}

 				if (i == history->get_path_size() - 1) {
 					//add name


Fix Call for one method from AliAnaRandomTrigger

--- PWGGA/CaloTrackCorrelations/macros/AddTaskIsoPhoton.C
+++ PWGGA/CaloTrackCorrelations/macros/AddTaskIsoPhoton.C
@@ -739,7 +739,7 @@
   ana->SetDebug(kDebug); //10 for lots of messages

   if(detector=="") detector = kCalorimeter;
-  ana->SetDetector(detector);
+  ana->SetTriggerDetector(detector);

   // selection cuts
   ana->SetMinPt(4.);


Fix the importer dock being blank when selecting multiple files.

Broken in cff0a1a896dfd825c4cccf1e3853ad5217261b40

--- editor/import_dock.cpp
+++ editor/import_dock.cpp
@@ -297,6 +297,8 @@
 	_set_dirty(false);
 	import_as->set_disabled(false);
 	preset->set_disabled(false);
+	content->show();
+	select_a_resource->hide();

 	imported->set_text(vformat(TTR("%d Files"), p_paths.size()));


reduce isolated photon fiducial area

reduce isolated photon fiducial area

--- PWGGA/CaloTrackCorrelations/macros/AddTaskIsoPhoton.C
+++ PWGGA/CaloTrackCorrelations/macros/AddTaskIsoPhoton.C
@@ -463,13 +463,19 @@
   //Avoid borders of EMCal
   if(calorimeter=="EMCAL")
 <<<<<<< HEAD
+<<<<<<< HEAD
+=======
+>>>>>>> f177d5e... reduce isolated photon fiducial area
   {
     //ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
     ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.27, 103, 157) ;
   }
+<<<<<<< HEAD
 =======
     ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
 >>>>>>> 02f44ef... wagon for photon isolation spectra analysis with CaloTrackCorr frame
+=======
+>>>>>>> f177d5e... reduce isolated photon fiducial area

   ana->SetMinPt(5);


last sample TLE, todo

last sample TLE, todo

--- Pat/dataStructure/5-07.cpp
+++ Pat/dataStructure/5-07.cpp
@@ -2,6 +2,7 @@
 #include <string>
 #include <vector>
 #include <map>
+#include <set>
 #include <algorithm>
 #include <functional>
 #include <cstdio>
@@ -23,30 +24,56 @@
 	freopen("input.txt", "r", stdin);
 	map<string, int> table;
 	int n = 0;
-	cin >> n;
-	cin.ignore();
+	scanf("%d\n", &n);

 	string line;
 	for (int i = 0; i < n; ++i)
 	{
 		getline(cin, line);
-		int pos1 = 0;
-		while (line[pos1] != '#') pos1++;
-		int pos2 = pos1 + 1;
-		while (line[pos2] != '#') pos2++;
-		string topic = line.substr(pos1+1, pos2 - pos1 - 1);
-		string finalTopic;
-		finalTopic.reserve(topic.size());
-		for (size_t i = 0; i < topic.size(); ++i)
+
+		int curPos = 0;
+		int lsz = line.size();
+
+		set<string> curLineTopics;
+		while (curPos < lsz)
 		{
-			if (isalpha(topic[i]) || isdigit(topic[i]) || isspace(topic[i]))
+			int pos1 = curPos;
+			while (pos1 < lsz && line[pos1] != '#') pos1++;
+			int pos2 = pos1 + 1;
+			while (pos2 < lsz && line[pos2] != '#') pos2++;
+			if (pos1 >= lsz || pos2 >= lsz)
 			{
-				finalTopic.push_back(tolower(topic[i]));
+				break;
 			}
+
+			string topic = line.substr(pos1+1, pos2 - pos1 - 1);
+			string finalTopic;
+			finalTopic.reserve(topic.size());
+			for (size_t i = 0; i < topic.size(); ++i)
+			{
+				if (isalpha(topic[i]) || isdigit(topic[i]) || isspace(topic[i]))
+				{
+					finalTopic.push_back(tolower(topic[i]));
+				}
+				if (topic[i] == '@')
+				{
+					finalTopic.push_back(' ');
+				}
+			}
+			//cout << "final topic:" << finalTopic << endl;
+			if (finalTopic.size() > 40) finalTopic = finalTopic.substr(0, 40);
+
+			curLineTopics.insert(finalTopic);
+
+			//table[finalTopic]++;
+
+			curPos = pos2 + 1;
 		}
-		//cout << "final topic:" << finalTopic << endl;
-		if (finalTopic.size() > 40) finalTopic = finalTopic.substr(0, 40);
-		table[finalTopic]++;
+
+		for (auto it = curLineTopics.begin(); it != curLineTopics.end(); ++it)
+		{
+			table[*it]++;
+		}
 	}

 	vector<pair<string, int> > v;


Adding pileUp option to container name

Adding pileUp option to container name

--- PWGGA/EMCALTasks/macros/AddTaskEMCALPhotonIsolation.C
+++ PWGGA/EMCALTasks/macros/AddTaskEMCALPhotonIsolation.C
@@ -107,12 +107,19 @@
   else{
     L1triggerName = "";
   }
-
+  TString pileUp;
+  if(RejectPileUpEvent){
+    pileUp=Form("_PU_ON%d",NContrToPileUp);
+  }
+  else{
+    pileUp="";
+  }
+
   if(L1triggerName != ""){
-    myContName.Append(Form("%s_TM_%s_CPVe%.2lf_CPVp%.2lf_IsoMet%d_EtIsoMet%d_UEMet%d_TPCbound_%s_IsoConeR%.1f_NLMCut_%s_minNLM%d_maxNLM%d_SSsmear_%s_Width%.3f_Mean_%.3f_PureIso_%s_WhichSmear_%d_Trigger_%s",isLCAnalysis?"_LC_Yes":"",bTMClusterRejection? "On" :"Off", TMdeta , TMdphi ,iIsoMethod,iEtIsoMethod,iUEMethod,bUseofTPC ? "Yes" : "No",iIsoConeRadius,bNLMCut ? "On": "Off",minNLM, NLMCut, iSmearingSS ? "On":"Off",iWidthSSsmear,iMean_SSsmear,iExtraIsoCuts?"On":"Off",bWhichToSmear,L1triggerName.Data()));
-  }
-  else{
-    myContName.Append(Form("%s_TM_%s_CPVe%.2lf_CPVp%.2lf_IsoMet%d_EtIsoMet%d_UEMet%d_TPCbound_%s_IsoConeR%.1f_NLMCut_%s_minNLM%d_maxNLM%d_SSsmear_%s_Width%.3f_Mean_%.3f_PureIso_%s_WhichSmear_%d",isLCAnalysis?"_LC_Yes":"",bTMClusterRejection? "On" :"Off", TMdeta , TMdphi ,iIsoMethod,iEtIsoMethod,iUEMethod,bUseofTPC ? "Yes" : "No",iIsoConeRadius,bNLMCut ? "On": "Off",minNLM, NLMCut, iSmearingSS ? "On":"Off",iWidthSSsmear,iMean_SSsmear,iExtraIsoCuts?"On":"Off",bWhichToSmear));
+    myContName.Append(Form("%s_TM_%s_CPVe%.2lf_CPVp%.2lf_IsoMet%d_EtIsoMet%d_UEMet%d_TPCbound_%s_IsoConeR%.1f_NLMCut_%s_minNLM%d_maxNLM%d_SSsmear_%s_Width%.3f_Mean_%.3f_PureIso_%s_WhichSmear_%d_Trigger_%s%s",isLCAnalysis?"_LC_Yes":"",bTMClusterRejection? "On" :"Off", TMdeta , TMdphi ,iIsoMethod,iEtIsoMethod,iUEMethod,bUseofTPC ? "Yes" : "No",iIsoConeRadius,bNLMCut ? "On": "Off",minNLM, NLMCut, iSmearingSS ? "On":"Off",iWidthSSsmear,iMean_SSsmear,iExtraIsoCuts?"On":"Off",bWhichToSmear,L1triggerName.Data(),pileUp.Data()));
+  }
+  else{
+    myContName.Append(Form("%s_TM_%s_CPVe%.2lf_CPVp%.2lf_IsoMet%d_EtIsoMet%d_UEMet%d_TPCbound_%s_IsoConeR%.1f_NLMCut_%s_minNLM%d_maxNLM%d_SSsmear_%s_Width%.3f_Mean_%.3f_PureIso_%s_WhichSmear_%d%s",isLCAnalysis?"_LC_Yes":"",bTMClusterRejection? "On" :"Off", TMdeta , TMdphi ,iIsoMethod,iEtIsoMethod,iUEMethod,bUseofTPC ? "Yes" : "No",iIsoConeRadius,bNLMCut ? "On": "Off",minNLM, NLMCut, iSmearingSS ? "On":"Off",iWidthSSsmear,iMean_SSsmear,iExtraIsoCuts?"On":"Off",bWhichToSmear,pileUp.Data()));
   }

   // #### Define analysis task


Fixed compiling

Fixed compiling

--- edupack/bspmv_test.cpp
+++ edupack/bspmv_test.cpp
@@ -88,8 +88,8 @@
         scanf_s( "%s", filename, STRLEN );
         fopen_s( &fp, filename, "r" );
 #else
-        scanf( "%s", filename, STRLEN );
-        fopen( &fp, filename, "r" );
+        scanf( "%s", filename );
+        fopen( filename, "r" );
 #endif

         /* A is an mA by nA matrix with nzA nonzeros


Fix new cov matrix name

Fix new cov matrix name


Fix in the removal of auocorrelation in case of using eta gap (Robert)

--- PWGHF/vertexingHF/charmFlow/AliAnalysisTaskSEHFv2.cxx
+++ PWGHF/vertexingHF/charmFlow/AliAnalysisTaskSEHFv2.cxx
@@ -847,14 +847,12 @@
     qx = pl->GetQContributionXArray();
     qy = pl->GetQContributionYArray();
     qcopy = *q;
-    }
-  else {
-    if(d->Eta()>0.){
+  }else {
+    if(d->Eta()<0.){
       qx = pl->GetQContributionXArraysub1();
       qy = pl->GetQContributionYArraysub1();
       qcopy = *qsub1;
-    }
-    else{
+    }else{
       qx = pl->GetQContributionXArraysub2();
       qy = pl->GetQContributionYArraysub2();
       qcopy = *qsub2;


Open audio codec

Open audio codec

--- csrc/Capture.cpp
+++ csrc/Capture.cpp
@@ -461,7 +461,12 @@
 		    audioContext->sample_rate = 48000;
 		    audioContext->channels = audioChannels;

-
+            if (avcodec_open2(audioContext, audioCodec, NULL) < 0) {
+	            printf("Could not open audio codec\n");
+	            env->CallVoidMethod(obj, stop);
+	            goto bail;
+	        }
+
         }

         avformat_write_header(oc, NULL);


STYLE: Get rid of commented code

STYLE: Get rid of commented code

--- Modules/Applications/AppImageUtils/app/otbExtractROI.cxx
+++ Modules/Applications/AppImageUtils/app/otbExtractROI.cxx
@@ -255,50 +255,38 @@
       inImage->UpdateOutputInformation();
       ImageType::RegionType  largestRegion = inImage->GetLargestPossibleRegion();

-      // bool userExtent = !HasUserValue( "mode.extent.ulx" ) \
-      //                && !HasUserValue( "mode.extent.uly" ) \
-      //                && !HasUserValue( "mode.extent.lrx" ) \
-      //                && !HasUserValue( "mode.extent.lry" );
-
-      // bool userRadius = !HasUserValue( "mode.radius.r" ) \
-      //                && !HasUserValue( "mode.radius.cx" ) \
-      //                && !HasUserValue( "mode.radius.cy" );
-
       ImageType::RegionType currentLargest;
-      currentLargest.SetSize( 0 , GetDefaultParameterInt("sizex") ); // need a methode to get default value
-      currentLargest.SetSize( 1 , GetDefaultParameterInt("sizey") ); // need a methode to get default value
+      currentLargest.SetSize( 0 , GetDefaultParameterInt("sizex") );
+      currentLargest.SetSize( 1 , GetDefaultParameterInt("sizey") );
       currentLargest.SetIndex( 1 , GetDefaultParameterInt("starty") );
       currentLargest.SetIndex( 0 , GetDefaultParameterInt("startx") );
       // Update default only if largest has changed
-      if ( !(currentLargest == largestRegion) )
-        {
-        std::cout<<"Reseting default value"<<std::endl;
-        // Put the limit of the index and the size relative the image
+      if ( currentLargest != largestRegion )
+        {
+        // Setting maximum value
         SetMaximumParameterIntValue( "sizex" , largestRegion.GetSize(0) );
         SetMaximumParameterIntValue( "sizey" , largestRegion.GetSize(1) );
         SetMaximumParameterIntValue( "startx" ,
           largestRegion.GetIndex(0) + largestRegion.GetSize(0) );
         SetMaximumParameterIntValue( "starty" ,
           largestRegion.GetIndex(1) + largestRegion.GetSize(1) );
-
+        // Setting default value
         SetDefaultParameterInt( "sizex" , largestRegion.GetSize(0) );
         SetDefaultParameterInt( "sizey" , largestRegion.GetSize(1) );
         SetDefaultParameterInt( "startx" , largestRegion.GetIndex(0) );
         SetDefaultParameterInt( "starty" , largestRegion.GetIndex(1) );
-        // if ( !HasUserValue("sizex") )
-          // SetParameterInt( "sizex" , largestRegion.GetSize(0) );
-        // if ( !HasUserValue("sizey") )
-          // SetParameterInt( "sizey" , largestRegion.GetSize(1) );
-
-        // Compute radius parameter with default sizex and sizey
-        // if ( GetParameterString( "mode" ) == "radius" && userRadius )
-          ComputeRadiusFromIndex( inImage , largestRegion );
-        // Compute extent parameter with default sizex and sizey
-        // if ( GetParameterString( "mode" ) == "extent" && userExtent )
-          ComputeExtentFromIndex( inImage, largestRegion );
-        }
-
-
+        // Setting actual value
+        if ( !HasUserValue("sizex") )
+          SetParameterFloat( "sizex" ,
+            GetDefaultParameterFloat( "sizex" ) );
+        if ( !HasUserValue("sizey") )
+          SetParameterFloat( "sizey" ,
+            GetDefaultParameterFloat( "sizey" ) );
+        // Compute radius parameters default value
+        ComputeRadiusFromIndex( inImage , largestRegion );
+        // Compute extent parameters default value
+        ComputeExtentFromIndex( inImage, largestRegion );
+        }

       unsigned int nbComponents = inImage->GetNumberOfComponentsPerPixel();
       ListViewParameter *clParam =
@@ -317,20 +305,10 @@
         }

       // Update the start and size parameter depending on the mode
-      if ( GetParameterString("mode") == "extent" )//&& !userExtent)
+      if ( GetParameterString("mode") == "extent" )
           ComputeIndexFromExtent();
-      if (GetParameterString("mode") == "radius" )//&& !userRadius)
+      if (GetParameterString("mode") == "radius" )
           ComputeIndexFromRadius();
-
-      // Crop the roi region to be included in the largest possible
-      // region
-   /*   if(!this->CropRegionOfInterest())
-        {
-        // Put the index of the ROI to origin and try to crop again
-        SetParameterInt("startx",0);
-        SetParameterInt("starty",0);
-        this->CropRegionOfInterest();
-        }*/

       if(GetParameterString("mode")=="fit")
         {


ISSUE FIX: Fixed so that the menu becomes unfocused after being hidden, and doesn't trigger librocket events.

--- Projects/Gameplay/Src/LibRocketEventManagerSystem.cpp
+++ Projects/Gameplay/Src/LibRocketEventManagerSystem.cpp
@@ -117,8 +117,12 @@
 		auto document = m_context->GetDocument(m_docIdStack.top());
 		m_docIdStack.pop();
 		if (document->IsVisible())
+		{
+			document->Show(Rocket::Core::ElementDocument::NONE);
 			document->Hide();
-	}
+		}
+	}
+
 	m_currentDocId = "";
 }

@@ -237,6 +241,9 @@
 		auto document = m_context->GetDocument(m_docIdStack.top());
 		m_docIdStack.pop();
 		if (document->IsVisible())
+		{
+			document->Show(Rocket::Core::ElementDocument::NONE);
 			document->Hide();
-	}
-}
+		}
+	}
+}


ENH: Remove undesired conversion that is triggering an exception

--- Modules/Core/Transform/include/otbGenericRSTransform.hxx
+++ Modules/Core/Transform/include/otbGenericRSTransform.hxx
@@ -107,9 +107,6 @@
   bool outputTransformIsSensor = false;
   bool outputTransformIsMap = false;

-  m_InputProjectionRef = SpatialReference::FromDescription(m_InputProjectionRef).ToWkt();
-  m_OutputProjectionRef = SpatialReference::FromDescription(m_OutputProjectionRef).ToWkt();
-
   //*****************************
   //Set the input transformation
   //*****************************


INTEGRATION: CWS sb59 (1.7.24); FILE MERGED 2006/08/09 12:53:54 sb 1.7.24.1: #i67487# Made code warning-free (wntmsci10).

--- xmloff/source/style/PageMasterPropHdl.hxx
+++ xmloff/source/style/PageMasterPropHdl.hxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: PageMasterPropHdl.hxx,v $
  *
- *  $Revision: 1.7 $
+ *  $Revision: 1.8 $
  *
- *  last change: $Author: hr $ $Date: 2006-06-19 18:26:59 $
+ *  last change: $Author: obo $ $Date: 2006-10-12 14:46:02 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -56,7 +56,7 @@
 {
 public:
     virtual                 ~XMLPMPropHdl_PageStyleLayout();
-    virtual sal_Bool        equals(
+    virtual bool            equals(
                                 const ::com::sun::star::uno::Any& rAny1,
                                 const ::com::sun::star::uno::Any& rAny2
                                 ) const;


Require at least one slice when initializing sliced geometry on objects with non-zero extents

Summary:
Code expects in multiple places that proper SliceGeometry3Ds
(at least evenly-spaced ones) have plane geometries, i.e. at least
one slice.
This change remedies violated assertions when loading very small
triangle meshes (e.g. extent 0.3 in one dimension).

Signed-off-by: Daniel Maleike <code@maleike.de>

Merge remote-tracking branch 'maleike/T11113-create-proper-geometry-for-small-meshes' into T11113-TinySliceGeometries

# Conflicts:
#	Modules/Core/src/DataManagement/mitkSlicedGeometry3D.cpp

Test Plan: Manual (see T11113)

Reviewers: goch

Reviewed By: goch

Maniphest Tasks: T11113

Differential Revision: https://phabricator.mitk.org/D104

--- Modules/Core/src/DataManagement/mitkSlicedGeometry3D.cpp
+++ Modules/Core/src/DataManagement/mitkSlicedGeometry3D.cpp
@@ -251,6 +251,10 @@
   /// you need to add 0.5 to safely convert it to unsigned it. I have seen a
   /// case when the result was less by one without this.
   auto slices = static_cast<unsigned int>(geometry3D->GetExtent(dominantAxis) + 0.5);
+  if ( slices == 0 && geometry3D->GetExtent(dominantAxis) > 0) {
+      // require at least one slice if there is _some_ extent
+      slices = 1;
+  }

 #ifndef NDEBUG
   int upDirection = itk::Function::Sign(inverseMatrix[dominantAxis][worldAxis]);


[GL3+] Apparently the spec says that you can support the GL_ARB_get_program_binary extension but not any binary formats. Dumb, but let's check how many are supported before enabling the support.

--- RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp
+++ RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp
@@ -454,7 +454,11 @@

         if (mGLSupport->checkExtension("GL_ARB_get_program_binary") || gl3wIsSupported(4, 1))
 		{
-			rsc->setCapability(RSC_CAN_GET_COMPILED_SHADER_BUFFER);
+            GLint formats;
+            OGRE_CHECK_GL_ERROR(glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &formats));
+
+            if(formats > 0)
+                rsc->setCapability(RSC_CAN_GET_COMPILED_SHADER_BUFFER);
 		}

         if (mGLSupport->checkExtension("GL_ARB_instanced_arrays") || gl3wIsSupported(3, 3))


[grid.walk] refs #10

[grid.walk] refs #10

--- dune/stuff/grid/walk.hh
+++ dune/stuff/grid/walk.hh
@@ -67,7 +67,7 @@
   {
     static_assert( codim == 0, "walking intersections is only possible for codim 0 entities" );
     for (const auto& entity : DSC::entityRange(gridView_)) {
-      const int entityIndex = gridView_.indexSet().index(entity);
+      const auto entityIndex = gridView_.indexSet().index(entity);
       entityFunctor( entity, entityIndex);
       for (const auto& intersection : DSC::intersectionRange(gridView_, entity)) {
         intersectionFunctor( entity, intersection);
@@ -83,7 +83,7 @@
   {
     static_assert( codim <= GridViewType::dimension, "codim too high to walk" );
     for (const auto& entity : DSC::entityRange(gridView_)) {
-      const int entityIndex = gridView_.indexSet().index(entity);
+      const auto entityIndex = gridView_.indexSet().index(entity);
       entityFunctor( entity, entityIndex);
     }
   }


Use more descriptive variable name.

Use more descriptive variable name.

Co-Authored-By: whitequark <b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org>

--- passes/hierarchy/submod.cc
+++ passes/hierarchy/submod.cc
@@ -273,8 +273,8 @@

 		if (opt_name.empty())
 		{
-			for (auto w : module->wires())
-				w->attributes.erase(ID::submod);
+			for (auto wire : module->wires())
+				wire->attributes.erase(ID::submod);

 			for (auto cell : module->cells())
 			{


Fix Context2D to clear the current shader before drawing.

Context2D uses default shaders for some of its drawing. Minor
change to clear the cuyrrent shader back to a default one.

Change-Id: I7e4e47371713ce360adf5e0fa53c018c76188baf

--- Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
+++ Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
@@ -46,6 +46,8 @@
 #include "vtkOpenGLContextDevice2DPrivate.h"
 #include "vtkAbstractContextBufferId.h"

+#include "vtkOpenGLShaderCache.h"
+
 #include <algorithm>

 //-----------------------------------------------------------------------------
@@ -108,6 +110,9 @@
   glEnable(GL_BLEND);

   this->Renderer = vtkRenderer::SafeDownCast(viewport);
+
+  vtkOpenGLRenderWindow *renWin = vtkOpenGLRenderWindow::SafeDownCast(this->Renderer->GetRenderWindow());
+  renWin->GetShaderCache()->ReleaseCurrentShader();

   // Enable simple line, point and polygon antialiasing if multisampling is on.
   if (this->Renderer->GetRenderWindow()->GetMultiSamples())


Unused include

Unused include

--- exotica/src/TaskMap.cpp
+++ exotica/src/TaskMap.cpp
@@ -32,7 +32,6 @@

 #include <exotica/TaskMap.h>
 #include <exotica/PlanningProblem.h>
-#include <boost/algorithm/string.hpp>
 #include <exotica/TaskMapInitializer.h>
 #include <exotica/FrameInitializer.h>


Make it compile under VS2005.

Make it compile under VS2005.

R=kkania@chromium.org
Review URL: http://codereview.chromium.org/6857003

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

--- chrome/browser/automation/automation_tab_helper.cc
+++ chrome/browser/automation/automation_tab_helper.cc
@@ -134,7 +134,7 @@
 }

 void AutomationTabHelper::OnDidCompleteOrCancelClientRedirect(int64 frame_id) {
-  std::set<int64>::const_iterator iter =
+  std::set<int64>::iterator iter =
       pending_client_redirects_.find(frame_id);
   // It is possible that we did not track the redirect becasue it had a non-zero
   // delay. See the comment in |OnWillPerformClientRedirect|.


drive: Runtime null check for callback in OnUpdatedFileUploaded is unnecessary.

The only caller (OnGetFileSizeCompleteForUpdateFile) is already taking
a mandatory non-null callback.

BUG=126634

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

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

--- chrome/browser/chromeos/drive/drive_file_system.cc
+++ chrome/browser/chromeos/drive/drive_file_system.cc
@@ -78,16 +78,6 @@
     callback.Run();
 }

-// Helper function called upon completion of AddUploadFile invoked by
-// OnTransferCompleted.
-void OnAddUploadFileCompleted(
-    const FileOperationCallback& callback,
-    DriveFileError error) {
-  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-  if (!callback.is_null())
-    callback.Run(error);
-}
-
 // The class to wait for the initial load of root feed and runs the callback
 // after the initialization.
 class InitialLoadObserver : public DriveFileSystemObserver {
@@ -1442,10 +1432,11 @@
     const FilePath& file_path,
     scoped_ptr<google_apis::DocumentEntry> document_entry) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
-  if (error != google_apis::DRIVE_UPLOAD_OK) {
-    if (!callback.is_null())
-      callback.Run(DriveUploadErrorToDriveFileError(error));
+  DCHECK(!callback.is_null());
+
+  DriveFileError drive_error = DriveUploadErrorToDriveFileError(error);
+  if (drive_error != DRIVE_FILE_OK) {
+    callback.Run(drive_error);
     return;
   }

@@ -1454,8 +1445,7 @@
                   document_entry.Pass(),
                   file_path,
                   DriveCache::FILE_OPERATION_MOVE,
-                  base::Bind(&OnAddUploadFileCompleted, callback,
-                             DriveUploadErrorToDriveFileError(error)));
+                  base::Bind(callback, drive_error));
 }

 void DriveFileSystem::GetAvailableSpace(


Ash Tray Browser Test

Ash Tray Browser Test

This to make sure that after login, the system tray is always visible
and within the bounds of the screen.

BUG=372838
TEST=interactive_ui_tests --gtest_filter=Login*Test.*

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

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#315784}

--- chrome/browser/chromeos/login/login_browsertest.cc
+++ chrome/browser/chromeos/login/login_browsertest.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.

 #include "ash/shell.h"
+#include "ash/system/tray/system_tray.h"
 #include "base/command_line.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/chromeos/login/login_wizard.h"
@@ -72,6 +73,15 @@
   }
 };

+// Used to make sure that the system tray is visible and within the screen
+// bounds after login.
+void TestSystemTrayIsVisible() {
+  ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
+  aura::Window* primary_win = ash::Shell::GetPrimaryRootWindow();
+  EXPECT_TRUE(tray->visible());
+  EXPECT_TRUE(primary_win->bounds().Contains(tray->GetBoundsInScreen()));
+}
+
 // After a chrome crash, the session manager will restart chrome with
 // the -login-user flag indicating that the user is already logged in.
 // This profile should NOT be an OTR profile.
@@ -81,11 +91,15 @@
   profile_base_path.insert(0, chrome::kProfileDirPrefix);
   EXPECT_EQ(profile_base_path, profile->GetPath().BaseName().value());
   EXPECT_FALSE(profile->IsOffTheRecord());
+
+  TestSystemTrayIsVisible();
 }

 // Verifies the cursor is not hidden at startup when user is logged in.
 IN_PROC_BROWSER_TEST_F(LoginUserTest, CursorShown) {
   EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible());
+
+  TestSystemTrayIsVisible();
 }

 // After a guest login, we should get the OTR default profile.
@@ -94,11 +108,15 @@
   EXPECT_TRUE(profile->IsOffTheRecord());
   // Ensure there's extension service for this profile.
   EXPECT_TRUE(extensions::ExtensionSystem::Get(profile)->extension_service());
+
+  TestSystemTrayIsVisible();
 }

 // Verifies the cursor is not hidden at startup when running guest session.
 IN_PROC_BROWSER_TEST_F(LoginGuestTest, CursorShown) {
   EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible());
+
+  TestSystemTrayIsVisible();
 }

 // Verifies the cursor is hidden at startup on login screen.
@@ -115,6 +133,8 @@

   base::MessageLoop::current()->DeleteSoon(
       FROM_HERE, chromeos::LoginDisplayHostImpl::default_host());
+
+  TestSystemTrayIsVisible();
 }

 // Verifies that the webui for login comes up successfully.
@@ -123,6 +143,8 @@
   EXPECT_TRUE(tracing::WaitForWatchEvent(no_timeout));
   std::string json_events;
   ASSERT_TRUE(tracing::EndTracing(&json_events));
+
+  TestSystemTrayIsVisible();
 }

 }  // namespace


Fix crash getting wallpapers.

Fix crash getting wallpapers.

Crash was introduced in https://chromiumcodereview.appspot.com/10384079

BUG=none
TEST=No crash (+ see original CL)
R=bshe@chormium.org

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

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

--- chrome/browser/chromeos/login/user_manager_impl.cc
+++ chrome/browser/chromeos/login/user_manager_impl.cc
@@ -1104,10 +1104,9 @@
   index = ash::GetDefaultWallpaperIndex();

   if (user_wallpapers) {
-    base::DictionaryValue* wallpaper_properties;
-    user_wallpapers->GetDictionaryWithoutPathExpansion(username,
-                                                       &wallpaper_properties);
-    if (wallpaper_properties) {
+    base::DictionaryValue* wallpaper_properties = NULL;
+    if (user_wallpapers->GetDictionaryWithoutPathExpansion(
+            username, &wallpaper_properties)) {
       int saved_type = User::UNKNOWN;
       wallpaper_properties->GetInteger(kWallpaperTypeNodeName, &saved_type);
       type = static_cast<User::WallpaperType>(saved_type);


Disabling a test (bug filed) that is crashing (I am not sure what the correct fix is).

BUG=None
TEST=None
Review URL: http://codereview.chromium.org/145023

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

--- chrome/browser/extensions/extension_browsertest.cc
+++ chrome/browser/extensions/extension_browsertest.cc
@@ -143,7 +143,8 @@

 // Tests that installing and uninstalling extensions don't crash with an
 // incognito window open.
-IN_PROC_BROWSER_TEST_F(ExtensionViewTest, Incognito) {
+// TODO(mpcomplete): http://crbug.com/14947 disabled because it crashes.
+IN_PROC_BROWSER_TEST_F(ExtensionViewTest, DISABLED_Incognito) {
   // Open an incognito window to the extensions management page.  We just
   // want to make sure that we don't crash while playing with extensions when
   // this guy is around.


Disable IsActive() in BrowserNavigatorTest tests.

Fix test failure on build bots from chromium-os:4046.

BUG=chromium-os:4046
TEST=Make sure BrowserNavigatorTest.Disposition_NewPopupUnfocused and BrowserNavigatorTest.Disposition_NewPopup succeed.

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

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

Former-commit-id: 6fa2d529485e0a81fd2db80b38a58d2d79eabd6b

--- chrome/browser/ui/browser_navigator_browsertest.cc
+++ chrome/browser/ui/browser_navigator_browsertest.cc
@@ -250,8 +250,8 @@

   // Navigate() should have opened a new, focused popup window.
   EXPECT_NE(browser(), p.browser);
-#if defined(OS_WIN)
-  // TODO(stevenjb): Enable this test for other OSs, see: crbug.com/79493
+#if 0
+  // TODO(stevenjb): Enable this test. See: crbug.com/79493
   EXPECT_TRUE(p.browser->window()->IsActive());
 #endif
   EXPECT_EQ(Browser::TYPE_POPUP, p.browser->type());
@@ -346,8 +346,6 @@
   // TODO(beng): TBD.
 }

-#if defined(OS_WIN)
-// TODO(stevenjb): Enable this test for other OSs, see: crbug.com/79493
 // This test verifies that navigating with window_action = SHOW_WINDOW_INACTIVE
 // does not focus a new new popup window.
 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_NewPopupUnfocused) {
@@ -361,9 +359,11 @@
   // Navigate() should have opened a new, unfocused, popup window.
   EXPECT_NE(browser(), p.browser);
   EXPECT_EQ(Browser::TYPE_POPUP, p.browser->type());
+#if 0
+// TODO(stevenjb): Enable this test. See: crbug.com/79493
   EXPECT_FALSE(p.browser->window()->IsActive());
-}
 #endif
+}

 // This test verifies that navigating with WindowOpenDisposition = NEW_WINDOW
 // always opens a new window.


Update picker code to more legibly manage the selection of display content. Fixes bug where the "Uh oh. No services" message wasn't being shown.

BUG=149710

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

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

--- chrome/browser/ui/views/web_intent_picker_views.cc
+++ chrome/browser/ui/views/web_intent_picker_views.cc
@@ -805,18 +805,27 @@
       size_t tag) OVERRIDE;

  private:
-  // Initialize the contents of the picker. After this call, contents_ will be
-  // non-NULL.
-  void InitContents();
-
-  // Initialize the main contents of the picker. (Suggestions, services).
-  void InitMainContents();
+  // Update picker contents to reflect the current state of the model.
+  void UpdateContents();
+
+  // Updates the dialog with the list of available services, suggestions,
+  // and a nice link to CWS to find more suggestions. This is the "Main"
+  // view of the picker.
+  void ShowAvailableServices();
+
+  // Informs the user that there are no services available to handle
+  // the intent, and that there are no suggestions from the Chrome Web Store.
+  void ShowNoServicesMessage();

   // Restore the contents of the picker to the initial contents.
   void ResetContents();

   // Resize the constrained window to the size of its contents.
   void SizeToContents();
+
+  // Returns the service selection question text used in the title
+  // of the picker.
+  const string16 GetActionTitle();

   // A weak pointer to the WebIntentPickerDelegate to notify when the user
   // chooses a service or cancels.
@@ -901,7 +910,6 @@
       extensions_(NULL),
       tab_contents_(tab_contents),
       webview_(new views::WebView(tab_contents->profile())),
-      contents_(NULL),
       window_(NULL),
       more_suggestions_link_(NULL),
       choose_another_service_link_(NULL),
@@ -911,10 +919,11 @@
       switches::kEnableFramelessConstrainedDialogs);

   model_->set_observer(this);
-  InitContents();
-
+  contents_ = new views::View();
   // Show the dialog.
   window_ = new ConstrainedWindowViews(tab_contents, this);
+
+  UpdateContents();
 }

 WebIntentPickerViews::~WebIntentPickerViews() {
@@ -971,7 +980,9 @@
   action_text_ = action;

   if (action_label_)
-    action_label_->SetText(action);
+    action_label_->SetText(GetActionTitle());
+    contents_->Layout();
+    SizeToContents();
 }

 void WebIntentPickerViews::OnExtensionInstallSuccess(const std::string& id) {
@@ -981,6 +992,7 @@
   extensions_->StopThrobber();
   more_suggestions_link_->SetEnabled(true);
   contents_->Layout();
+  SizeToContents();

   // TODO(binji): What to display to user on failure?
 }
@@ -993,15 +1005,10 @@
 }

 void WebIntentPickerViews::OnPendingAsyncCompleted() {
-  // Requests to both the WebIntentService and the Chrome Web Store have
-  // completed. If there are any services, installed or suggested, there's
-  // nothing to do.
-  if (model_->GetInstalledServiceCount() ||
-      model_->GetSuggestedExtensionCount())
-    return;
-
-  // If there are no installed or suggested services at this point,
-  // inform the user about it.
+  UpdateContents();
+}
+
+void WebIntentPickerViews::ShowNoServicesMessage() {
   contents_->RemoveAllChildViews(true);
   more_suggestions_link_ = NULL;

@@ -1033,8 +1040,8 @@
   body->SetText(l10n_util::GetStringUTF16(IDS_INTENT_PICKER_NO_SERVICES));
   grid_layout->AddView(body);

-  contents_->Layout();
-  SizeToContents();
+  int height = contents_->GetHeightForWidth(kWindowWidth);
+  contents_->SetSize(gfx::Size(kWindowWidth, height));
 }

 void WebIntentPickerViews::OnInlineDispositionWebContentsLoaded(
@@ -1106,9 +1113,9 @@
 }

 void WebIntentPickerViews::OnModelChanged(WebIntentPickerModel* model) {
-  if (waiting_view_ && !model->IsWaitingForSuggestions()) {
-    InitMainContents();
-  }
+  if (waiting_view_ && !model->IsWaitingForSuggestions())
+    UpdateContents();
+
   if (suggestions_label_) {
     string16 label_text = model->GetSuggestionsLinkText();
     suggestions_label_->SetText(label_text);
@@ -1195,22 +1202,31 @@
   delegate_->OnServiceChosen(service.url, service.disposition);
 }

-void WebIntentPickerViews::InitContents() {
-  DCHECK(!contents_);
-  contents_ = new views::View();
-
+void WebIntentPickerViews::UpdateContents() {
   if (model_ && model_->IsWaitingForSuggestions()) {
     contents_->RemoveAllChildViews(true);
     contents_->SetLayoutManager(new views::FillLayout());
     waiting_view_ = new WaitingView(this, use_close_button_);
     contents_->AddChildView(waiting_view_);
+    int height = contents_->GetHeightForWidth(kWindowWidth);
+    contents_->SetSize(gfx::Size(kWindowWidth, height));
     contents_->Layout();
+  } else if (model_->GetInstalledServiceCount() ||
+      model_->GetSuggestedExtensionCount()) {
+    ShowAvailableServices();
   } else {
-    InitMainContents();
-  }
-}
-
-void WebIntentPickerViews::InitMainContents() {
+    ShowNoServicesMessage();
+  }
+  SizeToContents();
+}
+
+const string16 WebIntentPickerViews::GetActionTitle() {
+  return (!action_text_.empty()) ?
+      action_text_ :
+      l10n_util::GetStringUTF16(IDS_INTENT_PICKER_CHOOSE_SERVICE);
+}
+
+void WebIntentPickerViews::ShowAvailableServices() {
   DCHECK(contents_);
   enum {
     kHeaderRowColumnSet,  // Column set for header layout.
@@ -1253,7 +1269,7 @@

   // Header row.
   grid_layout->StartRow(0, kHeaderRowColumnSet);
-  action_label_ = new views::Label();
+  action_label_ = new views::Label(GetActionTitle());
   action_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
   action_label_->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont));
   grid_layout->AddView(action_label_);
@@ -1290,6 +1306,7 @@
   more_suggestions_link_->set_listener(this);
   grid_layout->AddView(more_suggestions_link_, 1, 1, GridLayout::LEADING,
                        GridLayout::CENTER);
+  contents_->Layout();
 }

 void WebIntentPickerViews::ResetContents() {
@@ -1299,7 +1316,7 @@
   webview_ = NULL;

   // Re-initialize the UI.
-  InitMainContents();
+  UpdateContents();

   // Restore previous state.
   extensions_->Update();


Re-enable off-store installation temporarily.

I want to work on the UI some more.

BUG=55584
TBR=yoz@chromium.org

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

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

--- chrome/common/extensions/extension_switch_utils.cc
+++ chrome/common/extensions/extension_switch_utils.cc
@@ -17,8 +17,11 @@
 #if defined(USE_AURA)
   return true;
 #else
-  return CommandLine::ForCurrentProcess()->HasSwitch(
-      switches::kEnableOffStoreExtensionInstall);
+  // Currently, we default to enabling off-store install.
+  std::string switch_value =
+      CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+          switches::kEnableOffStoreExtensionInstall);
+  return switch_value != "0";
 #endif
 }


[ntuple] fix up set difference calculation

--- tree/ntuple/v7/src/RClusterPool.cxx
+++ tree/ntuple/v7/src/RClusterPool.cxx
@@ -163,8 +163,8 @@
       if (itr == fMap.end())
          return;
       ColumnSet_t d;
-      std::copy_if(columns.begin(), columns.end(), std::inserter(d, d.end()),
-         [&itr] (DescriptorId_t needle) { return itr->second.count(needle) == 0; });
+      std::copy_if(itr->second.begin(), itr->second.end(), std::inserter(d, d.end()),
+         [&columns] (DescriptorId_t needle) { return columns.count(needle) == 0; });
       if (d.empty()) {
          fMap.erase(itr);
       } else {


Fix bug #71656 : TTreeViewer complains 'nothing to draw' when I just want to scan (http://savannah.cern.ch/bugs/?71656)

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@34888 27541ba8-7e3a-0410-8455-c3a389f83636

--- tree/treeviewer/src/TTreeViewer.cxx
+++ tree/treeviewer/src/TTreeViewer.cxx
@@ -1356,7 +1356,7 @@
          if (alias[0].BeginsWith("~")) alias[0].Remove(0, 1);
       }
    }
-   if (!dimension) {
+   if (!dimension && !fScanMode) {
       Warning("ExecuteDraw", "Nothing to draw on X,Y,Z.");
       return;
    }


[C++] fixed missing initialization of pointer

Change-Id: I6d02f45e036a19aa12b9e9dc9be4b3a66ec5f2e9

--- cpp/libjoynr/joynr-messaging/dispatcher/MetaTypeRegistrar.cpp
+++ cpp/libjoynr/joynr-messaging/dispatcher/MetaTypeRegistrar.cpp
@@ -68,7 +68,7 @@
 {
     std::lock_guard<std::mutex> lock(publicationInterpretersMutex);

-    IPublicationInterpreter* ret;
+    IPublicationInterpreter* ret = nullptr;
     auto search = publicationInterpreters.find(typeId);
     if (search != publicationInterpreters.end()) {
         ret = search->second;
@@ -83,7 +83,7 @@
 {
     std::lock_guard<std::mutex> lock(replyInterpretersMutex);

-    IReplyInterpreter* ret;
+    IReplyInterpreter* ret = nullptr;
     auto search = replyInterpreters.find(typeId);
     if (search != replyInterpreters.end()) {
         ret = search->second;


Fix 560428, pushing for bgetlin (r=treilly,sr=lhansen)

--- MMgc/GCHeap.cpp
+++ MMgc/GCHeap.cpp
@@ -2301,6 +2301,10 @@
     {
         status = kMemAbort;
         EnterFrame *ef = enterFrame;
+
+        //  If we hit abort, we need to turn this back on so that listeners are guaranteed to get this signal
+        m_oomHandling = true;
+
         GCLog("error: out of memory\n");

         // release lock so we don't deadlock if exit or longjmp end up coming


Found bug in calculation of expected ball pos I hope we don't use that anywhere

--- NaoTHSoccer/Source/Cognition/Modules/Modeling/Simulation/Simulation.cpp
+++ NaoTHSoccer/Source/Cognition/Modules/Modeling/Simulation/Simulation.cpp
@@ -98,6 +98,7 @@
   STOPWATCH_STOP("Simulation:decide");

   getKickActionModel().bestAction = action_local[best_action].id();
+  //Arghhh BUG: this expected ball pos is not affected by goal boarders/ obstacles
   getKickActionModel().expectedBallPos = getRobotPose() * action_local[best_action].predict(getBallModel().positionPreview, false);

   DEBUG_REQUEST("Simulation:draw_best_action",


Add missing pkcs7.h include. (#510)

Add missing pkcs7.h include. (#510)

The PKCS7_* functions are defined in pkcs7.h nowadays.

--- common/src/jni/main/cpp/conscrypt/native_crypto.cc
+++ common/src/jni/main/cpp/conscrypt/native_crypto.cc
@@ -40,6 +40,7 @@
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <openssl/hmac.h>
+#include <openssl/pkcs7.h>
 #include <openssl/pkcs8.h>
 #include <openssl/rand.h>
 #include <openssl/rsa.h>


3D webview 2D widget wont show on click events if its scene is not active. So now it does not try to show when you click on entities in build mode that have the 3D webview

--- EntityComponents/EC_3DCanvasSource/EC_3DCanvasSource.cpp
+++ EntityComponents/EC_3DCanvasSource/EC_3DCanvasSource.cpp
@@ -23,6 +23,7 @@
 #include <QPushButton>
 #include <QUiLoader>
 #include <QVBoxLayout>
+#include <QGraphicsScene>

 #include "MemoryLeakCheck.h"

@@ -55,6 +56,10 @@
 {
     if ((getshow2d() == true) && (widget_) && (proxy_))
     {
+        if (!proxy_->scene())
+            return;
+        if (!proxy_->scene()->isActive())
+            return;
         if (proxy_->isVisible())
             proxy_->AnimatedHide();
         else


Remove verbose output

Remove verbose output

--- PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx
+++ PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx
@@ -243,7 +243,7 @@
   string tFriendFileName;

   // Get the friend information
-  cout<<"starting to read event "<<fCurEvent<<endl;
+  if (Debug()>1) cout<<"starting to read event "<<fCurEvent<<endl;
   //  fEvent->SetESDfriend(fEventFriend);
   if(fEvent->GetAliESDOld())fEvent->CopyFromOldESD();

@@ -419,7 +419,7 @@
 	Int_t incls = 0;
 	for (int iter=0; iter<6; iter++) if (iclm&(1<<iter)) incls++;
 	if (incls<=3) {
-	  cout << "Rejecting track with " << incls << " clusters" << endl;
+	  if (Debug()>1) cout << "Rejecting track with " << incls << " clusters" << endl;
 	  continue;
 	}
       }
@@ -646,7 +646,7 @@
     hbtEvent->SetCentralitySPD1(cent->GetCentralityPercentile("CL1"));
     //    hbtEvent->SetCentralityTrk(cent->GetCentralityPercentile("TRK"));

-    printf("  FemtoReader Got Event with %f %f %f %f\n", cent->GetCentralityPercentile("V0M"), 0.0, cent->GetCentralityPercentile("CL1"), 0.0);
+    if (Debug()>1) printf("  FemtoReader Got Event with %f %f %f %f\n", cent->GetCentralityPercentile("V0M"), 0.0, cent->GetCentralityPercentile("CL1"), 0.0);
   }

   if (fEstEventMult == kGlobalCount)
@@ -667,7 +667,7 @@
 	hbtEvent->SetNormalizedMult(-1);
       else
 	hbtEvent->SetNormalizedMult(lrint(10.0*cent->GetCentralityPercentile("V0M")));
-      printf ("Set Centrality %i %f %li\n", hbtEvent->UncorrectedNumberOfPrimaries(),
+      if (Debug()>1) printf ("Set Centrality %i %f %li\n", hbtEvent->UncorrectedNumberOfPrimaries(),
 	      10.0*cent->GetCentralityPercentile("V0M"), lrint(10.0*cent->GetCentralityPercentile("V0M")));
     }
   }
@@ -684,7 +684,7 @@
   }

   fCurEvent++;
-  cout<<"end of reading nt "<<nofTracks<<" real number "<<realnofTracks<<endl;
+  if (Debug()>1) cout<<"end of reading nt "<<nofTracks<<" real number "<<realnofTracks<<endl;

   return hbtEvent;
 }


[SofaKernel] Remove the implicit loading of "SceneCreator" in BaseTest.

--- SofaKernel/framework/sofa/helper/testing/BaseTest.cpp
+++ SofaKernel/framework/sofa/helper/testing/BaseTest.cpp
@@ -63,7 +63,6 @@

         const std::string pluginDir = Utils::getPluginDirectory() ;
         PluginRepository.addFirstPath(pluginDir);
-        PluginManager::getInstance().loadPlugin("SceneCreator") ;
         initialized=true ;
     }
 }


typo in pvz limit

typo in pvz limit

--- PWGCF/EBYE/LongAsymmetry/AliAnalysisTaskLegendreCoef.cxx
+++ PWGCF/EBYE/LongAsymmetry/AliAnalysisTaskLegendreCoef.cxx
@@ -266,7 +266,7 @@
   const AliAODVertex *PrimaryVertex = fAOD->GetVertex(0);
   if(!PrimaryVertex) return;
   Float_t PVz = PrimaryVertex->GetZ();
-  if(fabs(PVz)>fPtmin) return;
+  if(fabs(PVz)>fPVzMax) return;
   if(fabs(PVz)<fPVzMin) return;
   if(fPVzSign==1){//take only positive pvz
     if(PVz<0) return;


activate modules analysis

activate modules analysis

--- PWGGA/CaloTrackCorrelations/macros/AddTaskClusterShape.C
+++ PWGGA/CaloTrackCorrelations/macros/AddTaskClusterShape.C
@@ -598,8 +598,10 @@
   if(simulation) ana->SetConstantTimeShift(615);

   ana->SwitchOffFiducialCut();
-
+
   ana->SwitchOnStudyClusterShape();
+
+  ana->SwitchOnStudyEMCalModuleCells();

   ana->SwitchOffStudyClusterShapeParam();


The same error as the prev. one.

The same error as the prev. one.

--- tutorials/eve/projection_prescale.C
+++ tutorials/eve/projection_prescale.C
@@ -19,8 +19,8 @@

    TGLViewer* pgv = pev->GetGLViewer();
    pgv->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
-   TGLOrthoCamera* cam = (TGLOrthoCamera*) pgv->CurrentCamera();
-   cam->SetZoomMinMax(0.2, 20);
+   TGLOrthoCamera& cam = (TGLOrthoCamera&) pgv->CurrentCamera();
+   cam.SetZoomMinMax(0.2, 20);

    // projections
    TEveProjectionManager* mng = new TEveProjectionManager();


Distinction between charged particles and photons in the MC Truth UE calculation + removing some comments

--- PWGGA/EMCALTasks/AliAnalysisTaskEMCALPhotonIsolation.cxx
+++ PWGGA/EMCALTasks/AliAnalysisTaskEMCALPhotonIsolation.cxx
@@ -3895,8 +3895,8 @@

   Double_t etaMax = 0./*, etaMinDCal_InnerEdge = 0.*/, phiMinEMCal = 0., phiMaxEMCal = 0./*, phiMinDCal = 0. , phiMaxDCal_FullSM = 0., phiMaxDCal = 0.*/;

-  Double_t etap=mcpp->Eta();
-  Double_t phip=mcpp->Phi();
+  Double_t etap = mcpp->Eta();
+  Double_t phip = mcpp->Phi();

   if(!fTPC4Iso){
     etaMax = fGeom->GetArm1EtaMax()-0.03;
@@ -3912,76 +3912,80 @@
       phiMaxEMCal = TMath::Pi()-0.03;
     }

-    if(TMath::Abs(etap) >= etaMax || (phip <= phiMinEMCal || phip >= phiMaxEMCal))
-      return;
-    else{
-      switch(fUEMethod)
-      {
-        case 0: // Phi band
-          if(TMath::Abs(eta-etap)<fIsoConeRadius)
-            sumUE += mcpp->E()*TMath::Sin(mcpp->Theta());
-          else
-            return;
-
-          break;
-
-        case 1: // Eta band
-          if(TMath::Abs(phi-phip)<fIsoConeRadius)
-            sumUE += mcpp->E()*TMath::Sin(mcpp->Theta());
-          else
-            return;
-
-          break;
-      }
-    }
-  }
-  else{
-    etaMax = 0.87;
-    if(TMath::Abs(etap) >= etaMax) // SHOULD BE HARMONISED WITH (E,P)tIso(Clus,Track)(Eta,Phi)Band
-      return;
-    else{
+    if((phip < phiMaxEMCal) && (phip > phiMinEMCal) && (TMath::Abs(etap) < etaMax)){
       switch(fUEMethod)
       {
         case 0:{ // Phi band
-          if(TMath::Abs(eta-etap)<fIsoConeRadius)
-            sumUE += mcpp->E()*TMath::Sin(mcpp->Theta());
-          else
-            return;
+
+          if(TMath::Abs(eta-etap) < fIsoConeRadius){
+	    if(mcpp->Charge() != 0)
+	      sumUE += mcpp->Pt();
+	    else if(mcpp->GetPdgCode() == 22)
+	      sumUE += mcpp->E()*(TMath::Sin(mcpp->Theta()));
+	  }

           break;
         }
+
         case 1:{ // Eta band
-          if(TMath::Abs(phi-phip)<fIsoConeRadius)
-            sumUE += mcpp->E()*TMath::Sin(mcpp->Theta());
-          else
-            return;
+
+          if(TMath::Abs(phi-phip) < fIsoConeRadius){
+	    if(mcpp->Charge() != 0)
+	      sumUE += mcpp->Pt();
+	    else if(mcpp->GetPdgCode() == 22)
+	      sumUE += mcpp->E()*(TMath::Sin(mcpp->Theta()));
+	  }

           break;
         }
+      }
+    }
+  }
+  else{ // TPC for isolation/UE : charged particles only (implies Pt() instead of E_T)
+    etaMax = 0.87;
+
+    if(TMath::Abs(etap) < etaMax){
+      switch(fUEMethod)
+      {
+        case 0:{ // Phi band
+
+          if(TMath::Abs(eta-etap) < fIsoConeRadius)
+	    sumUE += mcpp->Pt();
+
+          break;
+        }
+
+        case 1:{ // Eta band
+
+          if(TMath::Abs(phi-phip) < fIsoConeRadius)
+	    sumUE += mcpp->Pt();
+
+          break;
+        }
+
         case 2:{ // Orthogonal Cones
-          double etacone1= eta;
-          double etacone2= eta;
-          double phicone1= phi - TMath::PiOver2();
-          double phicone2= phi + TMath::PiOver2();
+          double etacone1 = eta;
+          double etacone2 = eta;
+          double phicone1 = phi - TMath::PiOver2();
+          double phicone2 = phi + TMath::PiOver2();

           if(phicone1 < 0.)
             phicone1 += 2*TMath::Pi();

-          if(TMath::Sqrt(TMath::Power(etap-etacone1,2)+TMath::Power(phip-phicone1,2))< fIsoConeRadius ||
-             TMath::Sqrt(TMath::Power(etap-etacone2,2)+TMath::Power(phip-phicone2,2))< fIsoConeRadius)
+          if(TMath::Sqrt(TMath::Power(etap-etacone1,2)+TMath::Power(phip-phicone1,2)) < fIsoConeRadius ||
+             TMath::Sqrt(TMath::Power(etap-etacone2,2)+TMath::Power(phip-phicone2,2)) < fIsoConeRadius)
             sumUE += mcpp->Pt();
-          else
-            return;

           break;
         }
         case 3:{ // Full TPC

-            // Double_t phiup= phi +TMath::Pi()+fIsoConeRadius;
-            // Double_t phidown= phi +TMath::Pi()-fIsoConeRadius;
-            //
-            // if(phip < phidown || phip > phiup ) // TO BE CHECKED
-            // continue;
+	  // Double_t phiup= phi +TMath::Pi()+fIsoConeRadius;
+	  // Double_t phidown= phi +TMath::Pi()-fIsoConeRadius;
+	  //
+	  // if(phip < phidown || phip > phiup ) // TO BE CHECKED
+	  // continue;
+
           break;
         }
       }
@@ -4182,7 +4186,7 @@

     radius=0.;
     phip=0., etap=0.;
-    sumEiso=0.,sumUE=0.; // Initialisations to be moved in the below loop?
+    sumEiso=0.,sumUE=0.;

     for(int iTrack = 0; iTrack < nTracks; iTrack ++){

@@ -4196,11 +4200,10 @@
       if(mcpp->Charge() != 0 && mcpp->GetStatus()<10)
 	fPtTracksVSpTNC_MC->Fill(eT,mcpp->Pt());

-      if(fIsoMethod == 2){
-	if(mcpp->Charge() == 0)
-	  continue;
-      }
-      // Add a else if(fIsoMethod == 3) to avoid counting charged particles?
+      if(fIsoMethod == 2 && mcpp->Charge() == 0)
+	continue;
+      else if(fIsoMethod == 3 && mcpp->Charge() != 0)
+	continue;

       // Only final state, physical primary and primary particles
       if(mcpp->GetStatus()>10 || (!mcpp->IsPhysicalPrimary() || !mcpp->IsPrimary()))
@@ -4220,7 +4223,6 @@
       etap = mcpp->Eta();

       // Isolation and UE measurement
-      // (depending on which isolation/UE methods are considered)

       Double_t phiMin = 0., phiMax = 0., etaMin = 0., etaMax = 0.;

@@ -4259,7 +4261,7 @@
 	  else{
 	    if(mcpp->GetPdgCode() == 22) // Using E_T for photons
 	      sumEiso += mcpp->E()*(TMath::Sin(mcpp->Theta()));
-	    else // Skipping neutral hadrons -------------------------------------------- NOT FOR ISOLATION METHODS WHICH USE CLUSTERS, RIGHT???
+	    else // Skipping neutral hadrons
 	      continue;
 	  }

@@ -4289,7 +4291,6 @@
     if(fWho==1)
       fOutMCTruth->Fill(outputValuesMC);
     if(fWho==2)
-      // fPtvsSumUE_MC->Fill(eT, sumEiso); // No simulated UE yet
       fPtvsSumUE_MC->Fill(eT, sumEiso-sumUE);
   }


THRIFT-5159: Fix runtime ReferenceError in generated code

Client: nodejs

--- compiler/cpp/src/thrift/generate/t_js_generator.cc
+++ compiler/cpp/src/thrift/generate/t_js_generator.cc
@@ -1737,6 +1737,9 @@
   indent_up();

   if (gen_node_) {
+    if (gen_es6_ && is_subclass_service) {
+      indent(f_service_) << "super(output, pClass);" << endl;
+    }
     indent(f_service_) << "this.output = output;" << endl;
     indent(f_service_) << "this.pClass = pClass;" << endl;
     indent(f_service_) << "this._seqid = 0;" << endl;


minor change, different way to get Y

minor change, different way to get Y

--- PWGMM/UE/UeSpherocity/AliAnalysisTaskGenUeSpherocity.cxx
+++ PWGMM/UE/UeSpherocity/AliAnalysisTaskGenUeSpherocity.cxx
@@ -757,7 +757,11 @@

 		fHistEta->Fill(mcPart->Eta());

-		y = mcPart->Y();
+                if (!(TMath::Abs(mcPart->Energy()-mcPart->Pz())>0.)) continue;
+                Double_t myY = (mcPart->Energy()+mcPart->Pz())/(mcPart->Energy()-mcPart->Pz());
+                if( myY <= 0 ) continue;
+                y = 0.5*TMath::Log(myY);
+		//y = mcPart->Y();
 		ipt = mcPart->Pt();


security check

security check

--- ffmpeg_player_decoding.cpp
+++ ffmpeg_player_decoding.cpp
@@ -264,6 +264,7 @@
 int PlayerObject::seekRel(double incr) {
 	PlayerObject* pl = this;
 	PlayerObject::InStream* player = pl->inStream.get();
+	if(!player) return -1;

 	double pos = 0;
 	/*
@@ -309,6 +310,7 @@
 int PlayerObject::seekAbs(double pos) {
 	PlayerObject* pl = this;
 	PlayerObject::InStream* player = pl->inStream.get();
+	if(!player) return -1;
 	int seek_by_bytes = 0;
 	if(player->timeLen <= 0)
 		seek_by_bytes = 1;


small fix

small fix

--- ffmpeg_player_decoding.cpp
+++ ffmpeg_player_decoding.cpp
@@ -253,6 +253,7 @@
 void PlayerObject::InStream::resetBuffers() {
 	this->do_flush = true;
 	this->readerHitEnd = false;
+	this->outBuffer.clear();
 	player_resetStreamPackets(this);
 }


cosmetic

cosmetic

--- Library/Sources/Stroika/Foundation/Containers/Concrete/Mapping_stdmap.inl
+++ Library/Sources/Stroika/Foundation/Containers/Concrete/Mapping_stdmap.inl
@@ -33,7 +33,7 @@
                     using   inherited   =   typename    Mapping<KEY_TYPE, VALUE_TYPE, typename TRAITS::MappingTraitsType>::_IRep;
                 };

-#if 1
+
                 /*
                  */
                 template    <typename KEY_TYPE, typename VALUE_TYPE, typename TRAITS>
@@ -175,7 +175,7 @@
                 private:
                     DataStructureImplType_  fData_;
                 };
-#endif
+

                 /*
                  */


fixed POSIX ThroughTmpFileWriter

fixed POSIX ThroughTmpFileWriter

--- Library/Sources/Stroika/Foundation/IO/FileSystem/ThroughTmpFileWriter.cpp
+++ Library/Sources/Stroika/Foundation/IO/FileSystem/ThroughTmpFileWriter.cpp
@@ -81,7 +81,7 @@
         }
     }
 #elif   qPlatform_POSIX
-    Execution::ThrowErrNoIfNegative (::rename (fTmpFilePath_.c_str (), fRealFilePath_.c_str ()));
+    Execution::ThrowErrNoIfNegative (::rename (fTmpFilePath_.AsTString ().c_str (), fRealFilePath_.AsTString ().c_str ()));
 #else
     AssertNotImplemented ();
 #endif


[fix] compiler warning

[fix] compiler warning

Change-Id: Id774c137bd7afddcb992ff956e56a4dafba8aaff

--- MMOCoreORB/src/server/zone/objects/creature/DroidObjectImplementation.cpp
+++ MMOCoreORB/src/server/zone/objects/creature/DroidObjectImplementation.cpp
@@ -237,7 +237,7 @@
 				CraftingStation* craftingStation = craftingModule->getCraftingStation();
 				if (craftingStation != NULL) {
 					// case here to check each type
-					if (craftingModule->validCraftingType(type) || (type == CraftingTool::JEDI && craftingModule->isWeaponDroidGeneric()) || type == CraftingTool::GENERIC && craftingModule->isWeaponDroidGeneric())
+					if (craftingModule->validCraftingType(type) || (type == CraftingTool::JEDI && craftingModule->isWeaponDroidGeneric()) || (type == CraftingTool::GENERIC && craftingModule->isWeaponDroidGeneric()))
 					{
 						return craftingStation;
 					}


INTEGRATION: CWS oj08 (1.9.36); FILE MERGED 2004/01/30 13:29:02 oj 1.9.36.1: #i23881# change unsigned handling

--- connectivity/source/commontools/DateConversion.cxx
+++ connectivity/source/commontools/DateConversion.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: DateConversion.cxx,v $
  *
- *  $Revision: 1.9 $
- *
- *  last change: $Author: obo $ $Date: 2003-09-04 08:23:13 $
+ *  $Revision: 1.10 $
+ *
+ *  last change: $Author: obo $ $Date: 2004-03-15 12:45:47 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -106,6 +106,7 @@
 using namespace ::com::sun::star::sdbc;
 using namespace ::dbtools;
 using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
@@ -324,7 +325,31 @@
             xVariant->updateTime(toTime(rValue));
             break;
         default:
-            xVariant->updateDouble(rValue);
+            {
+                double nValue = rValue;
+//              Reference<XPropertySet> xProp(xVariant,UNO_QUERY);
+//              if (    xProp.is()
+//                  &&  xProp->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSIGNED))
+//                  && !::comphelper::getBOOL(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSIGNED))) )
+//              {
+//                  switch (::comphelper::getINT32(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))))
+//                  {
+//                      case DataType::TINYINT:
+//                          nValue = static_cast<sal_uInt8>(rValue);
+//                          break;
+//                      case DataType::SMALLINT:
+//                          nValue = static_cast<sal_uInt16>(rValue);
+//                          break;
+//                      case DataType::INTEGER:
+//                          nValue = static_cast<sal_uInt32>(rValue);
+//                          break;
+//                      case DataType::BIGINT:
+//                          nValue = static_cast<sal_uInt64>(rValue);
+//                          break;
+//                  }
+//              }
+                xVariant->updateDouble(nValue);
+            }
     }
 }

@@ -344,7 +369,27 @@
             case NumberFormat::TIME:
                 return toDouble(xVariant->getTime());
             default:
+            {
+                Reference<XPropertySet> xProp(xVariant,UNO_QUERY);
+                if (    xProp.is()
+                    &&  xProp->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSIGNED))
+                    && !::comphelper::getBOOL(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSIGNED))) )
+                {
+                    switch (::comphelper::getINT32(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))))
+                    {
+                        case DataType::TINYINT:
+                            return static_cast<double>(static_cast<sal_uInt8>(xVariant->getByte()));
+                        case DataType::SMALLINT:
+                            return static_cast<double>(static_cast<sal_uInt16>(xVariant->getShort()));
+                        case DataType::INTEGER:
+                            return static_cast<double>(static_cast<sal_uInt32>(xVariant->getInt()));
+                        case DataType::BIGINT:
+                            return static_cast<double>(static_cast<sal_uInt64>(xVariant->getLong()));
+                    }
+                }
+
                 return xVariant->getDouble();
+            }
         }
     }
     catch(const Exception& )
@@ -353,7 +398,7 @@
     }
 }
 //------------------------------------------------------------------------------
-::rtl::OUString DBTypeConversion::getValue(const Reference< ::com::sun::star::beans::XPropertySet>& _xColumn,
+::rtl::OUString DBTypeConversion::getValue(const Reference< XPropertySet>& _xColumn,
                                            const Reference<XNumberFormatter>& _xFormatter,
                                            const ::com::sun::star::lang::Locale& _rLocale,
                                            const Date& _rNullDate)


Added "stopp" and "disconnect" of the camera when closing ToFUtil.

--- Modules/Bundles/org.mitk.gui.qt.tofutil/src/internal/QmitkToFUtilView.cpp
+++ Modules/Bundles/org.mitk.gui.qt.tofutil/src/internal/QmitkToFUtilView.cpp
@@ -62,6 +62,8 @@

 QmitkToFUtilView::~QmitkToFUtilView()
 {
+  OnToFCameraStopped();
+  OnToFCameraDisconnected();
 }

 void QmitkToFUtilView::CreateQtPartControl( QWidget *parent )


Add transformVector

Add transformVector

--- engine/math/Matrix.hpp
+++ engine/math/Matrix.hpp
@@ -252,7 +252,8 @@
     }

     template <
-        typename T, std::size_t dims,
+        typename T,
+        std::size_t dims,
         std::size_t size,
         std::enable_if_t<(dims <= size)>* = nullptr
     >
@@ -286,6 +287,24 @@
                 result.v[i] += matrix.m[i * size + j] * vector.v[j];

         return result;
+    }
+
+    template <
+        typename T,
+        std::size_t size,
+        std::size_t dims,
+        std::enable_if_t<(dims <= size)>* = nullptr
+    >
+    void transformVector(const Matrix<T, size, size>& matrix,
+                         Vector<T, dims>& vector) noexcept
+    {
+        std::array<T, dims> result{};
+
+        for (std::size_t i = 0; i < dims; ++i)
+            for (std::size_t j = 0; j < dims; ++j)
+                result[i] += matrix.m[i * size + j] * vector.v[j];
+
+        vector.v = result;
     }

     template <typename T, std::size_t rows, std::size_t cols>


Resize buffer in readDataFormatted

Resize buffer in readDataFormatted

--- ecmd/ecmdCommandUtils.C
+++ ecmd/ecmdCommandUtils.C
@@ -335,12 +335,15 @@

   if (i_format == "x" || i_format == "xl") {
     rc = o_data.insertFromHexLeft(i_dataStr);
+    o_data.setBitLength(strlen(i_dataStr * 4);
   }
   else if (i_format == "xr") {
     rc = o_data.insertFromHexRight(i_dataStr);
+    o_data.setBitLength(strlen(i_dataStr * 4);
   }
   else if (i_format == "b") {
     rc = o_data.insertFromBin(i_dataStr);
+    o_data.setBitLength(strlen(i_dataStr);
   }
   else {
     ecmdOutputError( ("Did not recognize input format string " + i_format).c_str() );


ADDED: Gameplay - Error if not all player ships are assigned.

--- Source/PinnedDownGameplay/PinnedDownGameplay/Systems/AssignmentSystem.cpp
+++ Source/PinnedDownGameplay/PinnedDownGameplay/Systems/AssignmentSystem.cpp
@@ -4,6 +4,7 @@
 #include "Components\OwnerComponent.h"

 #include "Events\CardAssignedEvent.h"
+#include "Events\ErrorMessageEvent.h"
 #include "..\Events\FightStartedEvent.h"

 using namespace PinnedDownNet::Components;
@@ -121,6 +122,24 @@
 		return;
 	}

+	// Check if all player ships assigned.
+	for (auto itPlayerShips = this->playerCards.begin(); itPlayerShips != this->playerCards.end(); ++itPlayerShips)
+	{
+		auto playerShip = *itPlayerShips;
+
+		auto itAssignment = this->currentAssignments.find(playerShip);
+
+		if (itAssignment == this->currentAssignments.end())
+		{
+			// Error: Player ship not assigned.
+			auto errorMessageEvent = std::make_shared<ErrorMessageEvent>("Error_NotAllPlayerShipsAssigned");
+			this->game->eventManager->QueueEvent(errorMessageEvent);
+
+			return;
+		}
+	}
+
+
 	// Notify listeners.
 	auto turnPhaseChangedEvent = std::make_shared<TurnPhaseChangedEvent>(TurnPhase::Fight);
 	this->game->eventManager->QueueEvent(turnPhaseChangedEvent);


Eliminates constructions of std::tuple for performance reasons.

Specifically: reduces 68000 construction time from 10+ seconds to more like 2.8.

--- Processors/68000/68000.hpp
+++ Processors/68000/68000.hpp
@@ -97,9 +97,11 @@
 	RegisterPair16 *value = nullptr;

 	bool operator ==(const Microcycle &rhs) const {
-		return
-			std::make_tuple(value, address, length, operation, value) ==
-			std::make_tuple(rhs.value, rhs.address, rhs.length, rhs.operation, rhs.value);
+		if(value != rhs.value) return false;
+		if(address != rhs.address) return false;
+		if(length != rhs.length) return false;
+		if(operation != rhs.operation) return false;
+		return true;
 	}

 	// Various inspectors.


racunanje putanje za odbranu

racunanje putanje za odbranu

--- ProjectRvR/DefenseBase.cpp
+++ ProjectRvR/DefenseBase.cpp
@@ -32,7 +32,7 @@
 	{
 		Rocket* r = rockets->getRocketAt((detectionLine.getPosition().x));
 		det_rockets.push_back(r);
-		std::cout << "Detected rocket" << std::endl;
+		//std::cout << "Detected rocket" << std::endl;
 	}
 }

@@ -47,72 +47,70 @@

 		if(det_rockets[i]->getType() == 0)
 		{
-		if(det_rockets[i]->getShape().getPosition().x == 500)
-		{
-			det_rockets[i]->setPoint(det_rockets[i]->getShape().getPosition());
-			std::cout<<"Dodao\n";
-		}
+			if(det_rockets[i]->getShape().getPosition().x == 500)
+			{
+				det_rockets[i]->setPoint(det_rockets[i]->getShape().getPosition());
+				//std::cout<<"Dodao\n";
+			}

-		if(det_rockets[i]->getShape().getPosition().x == 400)
-		{
-			det_rockets[i]->setPoint(det_rockets[i]->getShape().getPosition());
-			std::cout<<"Dodao\n";
-		}
+			if(det_rockets[i]->getShape().getPosition().x == 400)
+			{
+				det_rockets[i]->setPoint(det_rockets[i]->getShape().getPosition());
+				//std::cout<<"Dodao\n";
+			}

-		if(det_rockets[i]->getShape().getPosition().x == 300)
-		{
-			det_rockets[i]->setPoint(det_rockets[i]->getShape().getPosition());
-			std::cout<<"Dodao\n";
-		}
-
-		if(det_rockets[i]->getCount() == 3)
-		{
-
-			Rocket *r = rockets->getRocket(RocketManager::DEFENSE);
-			float tmp[3];
-
-			//treba nam niz tacaka za onaj algo. interpolacije pa to ovde popunjavamo
-			float x[3], y[3];
-			for(int j = 0; j < 3; ++j)
+			if(det_rockets[i]->getShape().getPosition().x == 300)
 			{
-				x[j] = det_rockets[i]->points[j].x;
-				y[j] = det_rockets[i]->points[j].y;
-			//	std::cout<<x[j]<<" "<<y[j]<<std::endl;
+				det_rockets[i]->setPoint(det_rockets[i]->getShape().getPosition());
+				//std::cout<<"Dodao\n";
 			}

-			std::cout<<"Odbrana raketa..bum"<<std::endl;
+			if(det_rockets[i]->getCount() == 3)
+			{
+
+				Rocket *r = rockets->getRocket(RocketManager::DEFENSE);
+				float tmp[3];		//funkcija napadacke rakete

-			interpolation(x, y, tmp);
-			//tmp = r->getFun();
+				//treba nam niz tacaka za onaj algo. interpolacije pa to ovde popunjavamo
+				float x[3], y[3];
+				for(int j = 0; j < 3; ++j)
+				{
+					x[j] = det_rockets[i]->points[j].x - 400;	//transliramo u nas koordinatni sistem za racunanje pozicije
+					y[j] = det_rockets[i]->points[j].y - 300;	//PONETI PAPIR SA KOORDINATNIM SISTEMOM
+					std::cout<<x[j]<<" "<<y[j]<<std::endl;
+				}

-			float startX = -400;
-			float startY = 300;
-			float targetX = -400 + collisionLine.getPosition().x;
-			float targetY = tmp[0]*targetX*targetX + tmp[1]*targetX + tmp[2];
-			float midX = (startX + targetX)/2;
-			float midY = (startY + targetY)/2;
+				std::cout<<"Odbrana raketa..bum"<<std::endl;

-			float x1[3];
-			float y1[3];
+				interpolation(x, y, tmp);		//sacuvamo putanju detektovane rakete u tmp

-			x1[0] = startX; x1[1] = midX; x1[2] = targetX;
-			y1[0] = startY; y1[1] = midY; y1[2] = targetY;
-			//std::cout << startX << " " << midX << " " << targetX << std::endl;
-			//std::cout << startY << " " << midY << " " << targetY << std::endl;
-			//interpolation(x1, y1, r->getFun());
-			//r->setActive(true);
-			r->setType(1);
-			r->setFun(0, -0.5, 0);
-			r->setX(-400);
-			r->setY(300);
+				float startX = -400;			//raketa krece iz tacke(-400, -300)
+				float startY = -300;
+				float targetX = -400 + collisionLine.getPosition().x;	//pozicija prave na kojoj gadjamo
+				float targetY = tmp[0]*targetX*targetX + tmp[1]*targetX + tmp[2];//vrednost putanje detektovane rakete u toj tacki
+				float midX = (startX + targetX)/2;	//damo tacku izmedju, da se krece po linearnoj funkciji
+				float midY = (startY + targetY)/2;
+
+				float x1[3];
+				float y1[3];
+
+				x1[0] = startX; x1[1] = midX; x1[2] = targetX;	//postavimo vrednosti za interpolaciju
+				y1[0] = startY; y1[1] = midY; y1[2] = targetY;
+				//std::cout << startX << " " << midX << " " << targetX << std::endl;
+				//std::cout << startY << " " << midY << " " << targetY << std::endl;
+				interpolation(x1, y1, r->getFun());	//izracunamo linearnu funkciju po kojoj se krece, i ubacimo u odbrambenu raketu
+				r->setType(1);
+				//r->setFun(0, -0.5, 0);
+				r->setX(-400);	//postavljanje zbog crtanja
+				r->setY(-300);

-			//na osnovu ovih tacaka treba da se uradi interpolacija
-			//i da se dobije funkcija, pa mozemo da nadjemo gde se sece sa pravom
-			det_rockets.pop_back();
-		}
+				//na osnovu ovih tacaka treba da se uradi interpolacija
+				//i da se dobije funkcija, pa mozemo da nadjemo gde se sece sa pravom
+				det_rockets.pop_back();
+			}
 		}

 	}


Console Showing spher enumber

Console Showing spher enumber

--- ModuleImGui.cpp
+++ ModuleImGui.cpp
@@ -81,9 +81,8 @@
 					float r = 10;
 					AddSphere(1, 1, 1, r);
 					ImGuiTextBuffer t;
-					string st = "Created Sphere n " + std::to_string(i + 1);
-					t.append(st.c_str());
-					console->ConsoleLog(t.begin());
+					string st = "Created Sphere " + std::to_string(i + 1);
+					console->ConsoleLog(st.c_str());
 				}

 			}


improved QGLWidget render loop

improved QGLWidget render loop

--- QtGUI/QRenderingWidget.cpp
+++ QtGUI/QRenderingWidget.cpp
@@ -79,11 +79,7 @@

 	renderingTime = clock();

-	timer = std::make_unique<QTimer>(this);
-	timer->setInterval(15);
-	timer->start();
-	connect(timer.get(), SIGNAL(timeout()), this, SLOT(RenderFrame()));
-
+	connect(this, SIGNAL(RenderingCompleted(double)), this, SLOT(RenderFrame()));
 }

 void QRenderingWidget::resizeGL(int w, int h)
@@ -99,7 +95,7 @@

 void QRenderingWidget::RenderFrame()
 {
-	float deltaMs = (clock() - renderingTime) * 0.001;
+	float deltaMs = (clock() - renderingTime) * 0.001f;
 	renderingTime = clock();

 	bRenderer->camera.transform.Rotate(cameraRot.y * deltaMs, cameraRot.x * deltaMs, 0.0f);
@@ -113,6 +109,7 @@
 	cameraPos = Vector3::Zero();
 	cameraRot = Vector2::Zero();

+	//Calls paintEvent()
 	update();
 }

@@ -144,7 +141,6 @@
 	double endClock = clock() - beginClock;

 	emit RenderingCompleted(endClock);
-
 }

 void QRenderingWidget::keyPressEvent(QKeyEvent * event)


ColoringStack foi de fila para pilha

ColoringStack foi de fila para pilha

--- RAColorBasedCoalescing.cpp
+++ RAColorBasedCoalescing.cpp
@@ -39,6 +39,7 @@
 #include <cstdlib>
 #include <map>
 #include <set>
+#include <stack>
 #include <queue>
 #include <list>

@@ -82,7 +83,7 @@
   std::map<unsigned, std::set<unsigned>> InterferenceGraph;
   std::map<unsigned, int> Degree;
   std::map<unsigned, bool> OnStack;
-  std::queue<unsigned> ColoringStack;
+  std::stack<unsigned> ColoringStack;
   std::map<unsigned, int> ColorsTemp;
   std::map<unsigned, int> Colors;
   std::map<unsigned, std::set<unsigned>> CopyRelated;
@@ -620,7 +621,7 @@

 void RAColorBasedCoalescing::biasedSelectExtended() {
   while(!ColoringStack.empty()) {
-    unsigned vreg = ColoringStack.front();
+    unsigned vreg = ColoringStack.top();
     ColoringStack.pop();

     std::list<int> potentialRegs = getPotentialRegs(vreg);


Exposed Abstract Renderer functions.

Exposed Abstract Renderer functions.

setConsiderPrevDepthBuffer and loadDataset exposed.

git-svn-id: 83c4c97093aeea62ac982fbfd516bf9db27f5c99@2254 c36c8488-0289-0348-9b64-b301f74bd9a7

--- Renderer/AbstrRenderer.cpp
+++ Renderer/AbstrRenderer.cpp
@@ -1883,5 +1883,10 @@
                     "getWorkingBrick", "", false);
   id = reg.function(&AbstrRenderer::GetMinLODIndex,
                     "getMinLODIndex", "", false);
-}
-
+
+  id = reg.function(&AbstrRenderer::SetConsiderPreviousDepthbuffer,
+                    "setConsiderPrevDepthBuffer", "", true);
+  id = reg.function(&AbstrRenderer::LoadDataset,
+                    "loadDataset", "", true);
+}
+


added more test to the OpenGL subsystem (i.e. 3d texture support, 3d texture size)

git-svn-id: 353be9ac11a1e711854a13efcc2fc17d9d6b83e7@679 c36c8488-0289-0348-9b64-b301f74bd9a7

--- Renderer/GL/GLRenderer.cpp
+++ Renderer/GL/GLRenderer.cpp
@@ -282,12 +282,11 @@
       m_pProgramIsoCompose->Disable();
     }

-    // if m_bDownSampleTo8Bits is enabled the full range from 0..255 -> 0..1 is used thus
-    // to compute m_fScaledIsovalue & m_fScaledCVIsovalue correctly we set iMaxValue to 65536
-    size_t iMaxValue     = (m_bDownSampleTo8Bits) ? 65536 : m_p1DTrans->GetSize();
+    size_t iMaxValue        = m_p1DTrans->GetSize();
     UINT32 iMaxRange        = UINT32(1<<m_pDataset->GetInfo()->GetBitwith());
-    m_fScaledIsovalue       = m_fIsovalue * float(iMaxValue)/float(iMaxRange);
-    m_fScaledCVIsovalue     = m_fCVIsovalue * float(iMaxValue)/float(iMaxRange);
+    // if m_bDownSampleTo8Bits is enabled the full range from 0..255 -> 0..1 is used
+    m_fScaledIsovalue       = (m_pDataset->GetInfo()->GetBitwith() != 8 && m_bDownSampleTo8Bits) ? 1.0f : m_fIsovalue * float(iMaxValue)/float(iMaxRange);
+    m_fScaledCVIsovalue     = (m_pDataset->GetInfo()->GetBitwith() != 8 && m_bDownSampleTo8Bits) ? 1.0f : m_fCVIsovalue * float(iMaxValue)/float(iMaxRange);

   }
 }
@@ -1179,11 +1178,10 @@
 void GLRenderer::SetDataDepShaderVars() {
   m_pMasterController->DebugOut()->Message("GLRenderer::SetDataDepShaderVars","Setting up vars");

-  // if m_bDownSampleTo8Bits is enabled the full range from 0..255 -> 0..1 is used thus
-  // to compute fScale correctly we set iMaxValue to 65536
-  size_t iMaxValue     = (m_bDownSampleTo8Bits) ? 65536 : m_p1DTrans->GetSize();
+  size_t iMaxValue     = (m_pDataset->GetInfo()->GetBitwith() != 8 && m_bDownSampleTo8Bits) ? 65536 : m_p1DTrans->GetSize();
   UINT32 iMaxRange     = UINT32(1<<m_pDataset->GetInfo()->GetBitwith());
-  float fScale         = float(iMaxRange)/float(iMaxValue);
+  // if m_bDownSampleTo8Bits is enabled the full range from 0..255 -> 0..1 is used
+  float fScale         = (m_pDataset->GetInfo()->GetBitwith() != 8 && m_bDownSampleTo8Bits) ? 1.0f : float(iMaxRange)/float(iMaxValue);
   float fGradientScale = 1.0f/m_pDataset->GetMaxGradMagnitude();

   m_pProgramTransMIP->Enable();