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

dirstate.cpp: use ref param on lstat

Changeset ceb80b618ae3

Parent 1746e393c2fc

by Adrian Buehlmann

Changes to one file · Browse files at ceb80b618ae3 Showing diff from parent 1746e393c2fc Diff from another changeset...

 
46
47
48
49
 
50
51
52
 
57
58
59
60
61
 
 
62
63
64
 
172
173
174
175
 
176
177
178
 
230
231
232
233
 
234
235
 
236
237
238
 
288
289
290
291
 
292
293
294
 
46
47
48
 
49
50
51
52
 
57
58
59
 
 
60
61
62
63
64
 
172
173
174
 
175
176
177
178
 
230
231
232
 
233
234
 
235
236
237
238
 
288
289
290
 
291
292
293
294
@@ -46,7 +46,7 @@
 static __int64 days_between_epochs = 134774; /* days between 1.1.1601 and 1.1.1970 */  static __int64 secs_between_epochs = (__int64)days_between_epochs * 86400;   -int lstat(const char* file, struct _stat* pstat) +int lstat(const char* file, struct _stat& rstat)  {   WIN32_FIND_DATA data;   HANDLE hfind; @@ -57,8 +57,8 @@
  return -1;   FindClose(hfind);   - pstat->st_mtime = *(__int64*)&data.ftLastWriteTime / 10000000 - secs_between_epochs; - pstat->st_size = (data.nFileSizeHigh << sizeof(data.nFileSizeHigh)) | data.nFileSizeLow; + rstat.st_mtime = *(__int64*)&data.ftLastWriteTime / 10000000 - secs_between_epochs; + rstat.st_size = (data.nFileSizeHigh << sizeof(data.nFileSizeHigh)) | data.nFileSizeLow;     return 0;  } @@ -172,7 +172,7 @@
    struct _stat stat;   - if (0 != lstat(path.c_str(), &stat)) + if (0 != lstat(path.c_str(), stat))   return 0;     Iter iter = _cache.begin(); @@ -230,9 +230,9 @@
   int HgQueryDirstate(   const char* hgroot, const char* abspath, char* relpathloc, - const dirstate*& ppd, struct _stat& pstat) + const dirstate*& ppd, struct _stat& rstat)  { - if (0 != lstat(abspath, &pstat)) + if (0 != lstat(abspath, rstat))   {   TDEBUG_TRACE("HgQueryDirstate: lstat returns non-null");   return 0; @@ -288,7 +288,7 @@
  std::string temp = hgroot;   temp += "/";   temp += e.name; - if (0 == lstat(temp.c_str(), &stat)) + if (0 == lstat(temp.c_str(), stat))   modified = (mapdirstate(e, stat) == 'M');   }   break;