2
0
Michael Ragazzon 6 жил өмнө
parent
commit
762dab7f68

+ 0 - 1
Source/Controls/ElementDataGrid.cpp

@@ -236,7 +236,6 @@ void ElementDataGrid::OnUpdate()
 	bool any_new_children = root->UpdateChildren();
 	if (any_new_children)
 	{
-		// @performance: Does anyone really use this?
 		DispatchEvent(Core::EventId::Rowupdate, Rml::Core::Dictionary());
 	}
 	

+ 3 - 8
Source/Controls/ElementDataGridRow.cpp

@@ -409,19 +409,14 @@ void ElementDataGridRow::AddChildren(int first_row_added, int num_rows_added)
 	Rml::Core::Dictionary parameters;
 	parameters["first_row_added"] = GetChildTableRelativeIndex(first_row_added);
 	parameters["num_rows_added"] = num_rows_added;
-	// @performance: Does anyone really use this?
+	
 	parent_grid->DispatchEvent(Core::EventId::Rowadd, parameters);
 }
 
 void ElementDataGridRow::RemoveChildren(int first_row_removed, int num_rows_removed)
 {
 	if (num_rows_removed == -1)
-	{
 		num_rows_removed = (int)children.size() - first_row_removed;
-	}
-
-	// prevent relayout of the document while removing rows
-	Core::ElementDocument* document = parent_grid->GetOwnerDocument();
 
 	for (int i = num_rows_removed - 1; i >= 0; i--)
 	{
@@ -439,7 +434,7 @@ void ElementDataGridRow::RemoveChildren(int first_row_removed, int num_rows_remo
 	Rml::Core::Dictionary parameters;
 	parameters["first_row_removed"] = GetChildTableRelativeIndex(first_row_removed);
 	parameters["num_rows_removed"] = num_rows_removed;
-	// @performance: Does anyone really use this?
+	
 	parent_grid->DispatchEvent(Core::EventId::Rowremove, parameters);
 }
 
@@ -451,7 +446,7 @@ void ElementDataGridRow::ChangeChildren(int first_row_changed, int num_rows_chan
 	Rml::Core::Dictionary parameters;
 	parameters["first_row_changed"] = GetChildTableRelativeIndex(first_row_changed);
 	parameters["num_rows_changed"] = num_rows_changed;
-	// @performance: Does anyone really use this?
+	
 	parent_grid->DispatchEvent(Core::EventId::Rowchange, parameters);
 }
 

+ 0 - 5
Source/Core/DecoratorTiledInstancer.cpp

@@ -100,11 +100,6 @@ bool DecoratorTiledInstancer::GetTileProperties(DecoratorTiled::Tile* tiles, Tex
 		const Property* src_property = properties.GetProperty(ids.src);
 		const String texture_name = src_property->Get< String >();
 
-		if (texture_name == "window-tl")
-		{
-			int i = 0;
-		}
-
 		// Skip the tile if it has no source name.
 		// Declaring the name 'auto' is the same as an empty string. This gives an easy way to skip certain
 		// tiles in a shorthand since we can't always declare an empty string.

+ 2 - 2
Source/Core/ElementAnimation.cpp

@@ -348,8 +348,8 @@ static bool PrepareTransforms(std::vector<AnimationKey>& keys, Element& element,
 
 
 ElementAnimation::ElementAnimation(PropertyId property_id, ElementAnimationOrigin origin, const Property& current_value, double start_world_time, float duration, int num_iterations, bool alternate_direction)
-	: property_id(property_id), duration(duration), origin(origin), num_iterations(num_iterations), alternate_direction(alternate_direction),
-	last_update_world_time(start_world_time), time_since_iteration_start(0.0f), current_iteration(0), reverse_direction(false), animation_complete(false)
+	: property_id(property_id), duration(duration), num_iterations(num_iterations), alternate_direction(alternate_direction), last_update_world_time(start_world_time),
+	time_since_iteration_start(0.0f), current_iteration(0), reverse_direction(false), animation_complete(false), origin(origin)
 {
 	if (!current_value.definition)
 	{

+ 1 - 1
Source/Core/ElementStyle.cpp

@@ -463,7 +463,7 @@ PropertiesIterator ElementStyle::Iterate() const {
 		it_definition = definition_properties.begin();
 		it_definition_end = definition_properties.end();
 	}
-	return PropertiesIterator(pseudo_classes, it_style_begin, it_style_end, it_definition, it_definition_end);
+	return PropertiesIterator(it_style_begin, it_style_end, it_definition, it_definition_end);
 }
 
 // Sets a single property as dirty.

+ 1 - 3
Source/Core/FontDatabase.cpp

@@ -168,9 +168,7 @@ SharedPtr<FontFaceHandle> FontDatabase::GetFontFaceHandle(const String& family,
 		SharedPtr<FontFaceHandle> face_handle = font_provider_table[ provider_index ]->GetFontFaceHandle(family, charset, style, weight, size);
 
         if(face_handle)
-        {
-            return std::move(face_handle);
-        }
+            return face_handle;
     }
 
     return nullptr;

+ 2 - 3
Source/Core/PropertiesIterator.h

@@ -43,8 +43,8 @@ public:
 	using ValueType = std::pair<PropertyId, const Property&>;
 	using PropertyIt = PropertyMap::const_iterator;
 
-	PropertiesIterator(const PseudoClassList& element_pseudo_classes, PropertyIt it_style, PropertyIt it_style_end, PropertyIt it_definition, PropertyIt it_definition_end)
-		: element_pseudo_classes(&element_pseudo_classes), it_style(it_style), it_style_end(it_style_end), it_definition(it_definition), it_definition_end(it_definition_end)
+	PropertiesIterator(PropertyIt it_style, PropertyIt it_style_end, PropertyIt it_definition, PropertyIt it_definition_end)
+		: it_style(it_style), it_style_end(it_style_end), it_definition(it_definition), it_definition_end(it_definition_end)
 	{
 		ProceedToNextValid();
 	}
@@ -80,7 +80,6 @@ public:
 	}
 
 private:
-	const PseudoClassList* element_pseudo_classes;
 	DirtyPropertyList iterated_properties;
 	PropertyIt it_style, it_style_end;
 	PropertyIt it_definition, it_definition_end;

+ 0 - 1
Source/Core/Spritesheet.cpp

@@ -55,7 +55,6 @@ bool SpritesheetList::AddSpriteSheet(const String& name, const String& image_sou
 	StringList& sprite_names = sprite_sheet->sprite_names;
 
 	// Insert all the sprites with names not already defined in the global sprite list.
-	int num_removed_sprite_names = 0;
 	for (auto& sprite_definition : sprite_definitions)
 	{
 		const String& sprite_name = sprite_definition.first;