Changeset 39873 in vbox
- Timestamp:
- Jan 25, 2012 11:49:04 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/ministring.cpp
r39277 r39873 202 202 size_t RTCString::find(const char *pcszFind, size_t pos /*= 0*/) const 203 203 { 204 const char *pszThis, *p; 205 206 if ( ((pszThis = c_str())) 207 && (pos < length()) 208 && ((p = strstr(pszThis + pos, pcszFind))) 209 ) 210 return p - pszThis; 204 if (pos < length()) 205 { 206 const char *pszThis = c_str(); 207 if (pszThis) 208 { 209 const char *pszHit = strstr(pszThis, pcszFind); 210 if (pszHit) 211 return pszHit - pszThis; 212 } 213 } 211 214 212 215 return npos;
Note:
See TracChangeset
for help on using the changeset viewer.