Fix 1499921 (debian #365102): synfigstudio startup crashes on amd64
authorpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 3 Jun 2006 06:07:15 +0000 (06:07 +0000)
committerpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 3 Jun 2006 06:07:15 +0000 (06:07 +0000)
Thanks to: Ben Green aka Sciboy, Anthony DeRobertis, Fabian Fagerholm and Kurt Roeckx

git-svn-id: http://svn.voria.com/code@178 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/dockbook.cpp
synfig-studio/trunk/src/gtkmm/dockdialog.cpp
synfig-studio/trunk/src/gtkmm/dockmanager.cpp

index 5968187..57828c9 100644 (file)
@@ -213,7 +213,7 @@ DockBook::set_contents(const synfig::String& x)
        synfig::String str(x);
        while(!str.empty())
        {
-               unsigned int separator=str.find_first_of(' ');
+               synfig::String::size_type separator=str.find_first_of(' ');
                synfig::String dock;
                if(separator==synfig::String::npos)
                {
index 9995445..3fff0d9 100644 (file)
@@ -480,9 +480,9 @@ DockDialog::set_contents(const synfig::String& z)
        synfig::String str(z);
        while(!str.empty())
        {
-               unsigned int separator=str.find_first_of('-');
+               synfig::String::size_type separator=str.find_first_of('-');
                {
-                       unsigned int sep2=str.find_first_of('|');
+                       synfig::String::size_type sep2=str.find_first_of('|');
                        if(separator!=synfig::String::npos || sep2!=synfig::String::npos)
                        {
                                if((separator==synfig::String::npos || sep2<separator) && sep2!=synfig::String::npos)
index 72c84d4..a280a32 100644 (file)
@@ -73,7 +73,7 @@ public:
                if(key_.size()>6 && String(key_.begin(),key_.begin()+6)=="dialog")try
                {
                        synfig::String key(key_.begin()+7,key_.end());
-                       int separator=key.find_first_of('.');
+                       synfig::String::size_type separator=key.find_first_of('.');
                        int id(atoi(synfig::String(key.begin(),key.begin()+separator).c_str()));
                        key=synfig::String(key.begin()+separator+1,key.end());
                        
@@ -123,7 +123,7 @@ public:
                if(key_.size()>6 && String(key_.begin(),key_.begin()+6)=="dialog")
                {
                        synfig::String key(key_.begin()+7,key_.end());
-                       int separator=key.find_first_of('.');
+                       synfig::String::size_type separator=key.find_first_of('.');
                        int id(atoi(synfig::String(key.begin(),key.begin()+separator).c_str()));
                        key=synfig::String(key.begin()+separator+1,key.end());
                        
@@ -134,7 +134,7 @@ public:
                                try {
                                        
                                vector<int> data;
-                               int n=0;
+                               String::size_type n=0;
                                String value_(value);
                                while(value_.size() && (signed)value_.size()>n && n>=0){
                                        value_=String(value_.begin()+n,value_.end());
@@ -145,7 +145,7 @@ public:
                                        data.push_back(size);
 
                                        n=value_.find(" ");
-                                       if((unsigned)n!=String::npos)
+                                       if(n!=String::npos)
                                                n++;
                                                
                                }