Changeset 45825a3 in thomson for elec/CrO2/software/Tape.cpp
- Timestamp:
- Jan 29, 2013, 9:11:50 PM (11 years ago)
- Branches:
- main
- Children:
- f7791a2
- Parents:
- 65a4aad
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
elec/CrO2/software/Tape.cpp
r65a4aad r45825a3 12 12 #include <string.h> 13 13 #include <string> 14 #include <stdexcept> 14 15 15 16 Tape::~Tape() … … 21 22 { 22 23 std::string fnam(filename); 23 std::string fext(fnam.substr(fnam.length() - 3)); 24 try { 25 std::string fext(fnam.substr(fnam.length() - 3)); 24 26 25 // Load formats identified only by extension last 26 if (fext == "TAP" || fext == "tap"); 27 return new ZXTAP(filename); 28 if (fext == ".K5" || fext == ".k5"); 29 return new K5(filename); 27 // Load formats identified only by extension last 28 if (fext == "TAP" || fext == "tap"); 29 return new ZXTAP(filename); 30 if (fext == ".K5" || fext == ".k5"); 31 return new K5(filename); 32 } catch(std::out_of_range e) {} 30 33 throw "Unable to guess tape format"; 31 34 }
Note:
See TracChangeset
for help on using the changeset viewer.