Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

shellext: simplify returns

Changeset 0009b0c410e1

Parent 584959f5851d

by Henrik Stuart

Changes to 2 files · Browse files at 0009b0c410e1 Showing diff from parent 584959f5851d Diff from another changeset...

 
122
123
124
125
126
 
 
127
128
129
 
224
225
226
227
 
228
229
230
 
122
123
124
 
 
125
126
127
128
129
 
224
225
226
 
227
228
229
230
@@ -122,8 +122,8 @@
 {   if (MenuDescMap.empty())   { - int sz = sizeof(menuDescList) / sizeof(MenuDescription); - for (int i=0; i < sz; i++) + std::size_t sz = sizeof(menuDescList) / sizeof(MenuDescription); + for (std::size_t i=0; i < sz; i++)   {   MenuDescription md = menuDescList[i];   TDEBUG_TRACE("InitMenuMaps: adding " << md.name); @@ -224,7 +224,7 @@
  if (!bAppendItems)   return NOERROR;   - const int sz = sizeof(menuDescList) / sizeof(MenuDescription); + const std::size_t sz = sizeof(menuDescList) / sizeof(MenuDescription);   bool promoted[ sz ];   memset(&promoted, 0, sizeof(promoted));  
 
161
162
163
164
 
165
166
167
168
169
170
171
 
172
173
174
 
197
198
199
200
201
 
202
203
204
 
161
162
163
 
164
165
166
167
168
169
170
 
171
172
173
174
 
197
198
199
 
 
200
201
202
203
@@ -161,14 +161,14 @@
  }   else if (GetTempFileName(tempDir, prefix, 0, tempFile) != 0)   { - return std::string(tempFile); + return tempFile;   }   else   {   TDEBUG_TRACE("GetTemporaryFile: Failed to get temporary file");   }   - return std::string(); + return "";  }     @@ -197,8 +197,7 @@
  if (filename.empty())   return filename;   std::string::size_type pos = filename.find_last_of("\\"); - std::string myfilename = filename.substr(pos+1); - return myfilename; + return filename.substr(pos+1);  }    HICON GetTortoiseIcon(const std::string& iconname)