Changeset 3320 in vbox
- Timestamp:
- Jun 27, 2007 3:12:10 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HardDiskImpl.cpp
r3317 r3320 1073 1073 1074 1074 /* try to guess the probe order by extension */ 1075 size_t first = -1; 1075 size_t first = 0; 1076 bool haveFirst = false; 1076 1077 Utf8Str loc = aLocation; 1077 1078 char *ext = RTPathExt (loc); … … 1082 1083 { 1083 1084 first = i; 1085 haveFirst = true; 1084 1086 break; 1085 1087 } … … 1093 1095 for (size_t i = 0; i < ELEMENTS (storageTypes); ++ i) 1094 1096 { 1095 size_t j = first == -1? i : i == 0 ? first : i == first ? 0 : i;1097 size_t j = !haveFirst ? i : i == 0 ? first : i == first ? 0 : i; 1096 1098 switch (storageTypes [j].type) 1097 1099 { … … 1130 1132 Assert (FAILED (rc)); 1131 1133 1132 /* remember the first encountered error*/1133 if ( j == first)1134 /* remember the error of the matching class */ 1135 if (haveFirst && j == first) 1134 1136 { 1135 1137 firstRC = rc; … … 1138 1140 } 1139 1141 1140 if ( first != -1)1142 if (haveFirst) 1141 1143 { 1142 1144 Assert (FAILED (firstRC));
Note:
See TracChangeset
for help on using the changeset viewer.