[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 14/20: Use string size_type for indexes.

noreply at xfce.org noreply at xfce.org
Thu Feb 6 12:03:31 CET 2020


This is an automated email from the git hooks/post-receive script.

g   o   t   t   c   o   d   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 3212dc87cefead56991b9a8ebaba6d00a8ce2f0d
Author: Graeme Gott <graeme at gottcode.org>
Date:   Sun Feb 2 06:25:23 2020 -0500

    Use string size_type for indexes.
---
 panel-plugin/launcher.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/panel-plugin/launcher.cpp b/panel-plugin/launcher.cpp
index 2130aba..c54462b 100644
--- a/panel-plugin/launcher.cpp
+++ b/panel-plugin/launcher.cpp
@@ -54,7 +54,7 @@ static std::string normalize(const gchar* string)
 
 //-----------------------------------------------------------------------------
 
-static void replace_with_quoted_string(std::string& command, size_t& index, const gchar* unquoted)
+static void replace_with_quoted_string(std::string& command, std::string::size_type& index, const gchar* unquoted)
 {
 	if (!exo_str_is_empty(unquoted))
 	{
@@ -71,7 +71,7 @@ static void replace_with_quoted_string(std::string& command, size_t& index, cons
 
 //-----------------------------------------------------------------------------
 
-static void replace_with_quoted_string(std::string& command, size_t& index, const char* prefix, const gchar* unquoted)
+static void replace_with_quoted_string(std::string& command, std::string::size_type& index, const char* prefix, const gchar* unquoted)
 {
 	if (!exo_str_is_empty(unquoted))
 	{
@@ -91,7 +91,7 @@ static void replace_with_quoted_string(std::string& command, size_t& index, cons
 
 //-----------------------------------------------------------------------------
 
-static void replace_and_free_with_quoted_string(std::string& command, size_t& index, gchar* unquoted)
+static void replace_and_free_with_quoted_string(std::string& command, std::string::size_type& index, gchar* unquoted)
 {
 	replace_with_quoted_string(command, index, unquoted);
 	g_free(unquoted);
@@ -205,7 +205,7 @@ void Launcher::hide()
 	if (uri)
 	{
 		gchar** dirs = xfce_resource_lookup_all(XFCE_RESOURCE_DATA, "applications/");
-		for (guint i = 0; dirs[i]; i++)
+		for (size_t i = 0; dirs[i]; ++i)
 		{
 			if (g_str_has_prefix(uri + 7, dirs[i]))
 			{
@@ -258,8 +258,8 @@ void Launcher::run(GdkScreen* screen) const
 	}
 
 	// Expand the field codes
-	size_t length = command.length() - 1;
-	for (size_t i = 0; i < length; ++i)
+	std::string::size_type length = command.length() - 1;
+	for (std::string::size_type i = 0; i < length; ++i)
 	{
 		if (G_UNLIKELY(command[i] == '%'))
 		{
@@ -332,8 +332,8 @@ void Launcher::run(GdkScreen* screen, DesktopAction* action) const
 	std::string command(string);
 
 	// Expand the field codes
-	size_t length = command.length() - 1;
-	for (size_t i = 0; i < length; ++i)
+	std::string::size_type length = command.length() - 1;
+	for (std::string::size_type i = 0; i < length; ++i)
 	{
 		if (G_UNLIKELY(command[i] == '%'))
 		{

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list