r23534 by jghali - Code style fixes and cleanups

scribus-commit scribus-commit at lists.scribus.net
Mon Mar 23 23:53:32 UTC 2020


Author: jghali
Date: Mon Mar 23 23:53:32 2020
New Revision: 23534

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23534
Log:
Code style fixes and cleanups

Modified:
    trunk/Scribus/scribus/text/storytext.cpp
    trunk/Scribus/scribus/text/storytext.h

Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23534&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp	(original)
+++ trunk/Scribus/scribus/text/storytext.cpp	Mon Mar 23 23:53:32 2020
@@ -2119,7 +2119,7 @@
 
 void StoryText::invalidate(int firstItem, int endItem)
 {
-	for (int i=firstItem; i < endItem; ++i)
+	for (int i = firstItem; i < endItem; ++i)
 	{
 		ParagraphStyle* par = item(i)->parstyle;
 		if (par)
@@ -2129,7 +2129,6 @@
 		emit changed(firstItem, endItem);
 }
 
-
 // physical view
 
 /*
@@ -2144,52 +2143,17 @@
 }
 */
 
-
-
-ScText*  StoryText::item(uint itm)
-{
-	assert( static_cast<int>(itm) < length() );
+ScText*  StoryText::item(int itm)
+{
+	assert( itm < length() );
 	return const_cast<StoryText *>(this)->d->at(itm);
 }
 
-
-const ScText*  StoryText::item(uint itm) const
-{
-	assert( static_cast<int>(itm) < length() );
+const ScText*  StoryText::item(int itm) const
+{
+	assert( itm < length() );
 	return const_cast<StoryText *>(this)->d->at(itm);
 }
-
-
-//const QString StoryText::itemText(uint itm) const
-//{
-	
-//	assert( static_cast<int>(itm) < length() );
-
-//	return text(itm, 1);
-//}
-
-
-//const CharStyle StoryText::itemStyle(uint itm) const
-//{
-//	assert( static_cast<int>(itm) < length() );
-
-//	return charStyle(itm);
-//}
-	
-
-//int StoryText::startOfItem(uint itm) const
-//{
-//	assert( static_cast<int>(itm) < length() );
-
-//	return itm;
-//}
-
-//int StoryText::endOfItem(uint itm) const
-//{
-//	assert( static_cast<int>(itm) < length() );
-
-//	return itm + 1;
-//}
 
 
 using namespace desaxe;

Modified: trunk/Scribus/scribus/text/storytext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23534&path=/trunk/Scribus/scribus/text/storytext.h
==============================================================================
--- trunk/Scribus/scribus/text/storytext.h	(original)
+++ trunk/Scribus/scribus/text/storytext.h	Mon Mar 23 23:53:32 2020
@@ -287,8 +287,8 @@
 	void changed(int firstItem, int endItem);
 
 private:
-	ScText * item(uint index);
-	const ScText * item(uint index) const;
+	ScText * item(int index);
+	const ScText * item(int index) const;
 	void fixSurrogateSelection();
 	
 private:




More information about the scribus-commit mailing list