Changeset 14371 for trunk/FACT++/src
- Timestamp:
- 08/14/12 12:29:26 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DimState.h
r14369 r14371 262 262 scriptdepth = -1; 263 263 264 // Evaluate msg265 const size_t p0 = msg.find_first_of(' :');264 // Find begining of descriptor 265 const size_t p0 = msg.find_first_of(' '); 266 266 if (p0==std::string::npos) 267 267 return StateMachineImp::kSM_KeepState; 268 268 269 // Evaluate scriptdepth 270 const size_t ps = msg.find_first_of('-'); 271 if (ps!=std::string::npos) 272 scriptdepth = atoi(msg.c_str()+ps+1); 273 274 // Find filename 275 const size_t p1 = msg.find_last_of('['); 269 // Find begining of filename 270 const size_t p1 = msg.find_first_of(':'); 276 271 if (p1==std::string::npos) 277 272 return StateMachineImp::kSM_KeepState; 278 273 279 const size_t p2 = msg.find_first_of(':', p0+1); 280 281 const size_t p3 = p2==std::string::npos || p2>p1 ? p1-1 : p2; 282 283 file = msg.substr(p0+2, p3-p0-2); 284 285 shortmsg.erase(p0, p3-p0); 274 // Find end of filename 275 const size_t p2 = msg.find_last_of('['); 276 if (p2==std::string::npos) 277 return StateMachineImp::kSM_KeepState; 278 279 scriptdepth = atoi(msg.c_str()+p0+1); 280 file = msg.substr(p1+1, p2-p1-1); 281 282 shortmsg.insert(0, msg.substr(p0+1, p1-p0)); 283 shortmsg.erase(p1+1,p2-p0-1); 286 284 287 285 const int rc = Callback(evt);
Note:
See TracChangeset
for help on using the changeset viewer.