mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
FIX: safe the ams_id traverse
jira: [none] Change-Id: I58b7769f843f3dbef8b51a15768711257f590dba (cherry picked from commit f0efb9af0d1f5df72f2b43d8ffef581d177c49a4)
This commit is contained in:
@@ -53,6 +53,20 @@ struct FilamentInfo
|
||||
/*for new ams mapping*/
|
||||
std::string ams_id;
|
||||
std::string slot_id;
|
||||
|
||||
public:
|
||||
int get_amd_id() const
|
||||
{
|
||||
if (ams_id.empty()) { return -1; };
|
||||
|
||||
try
|
||||
{
|
||||
return stoi(ams_id);
|
||||
}
|
||||
catch (...) {};
|
||||
|
||||
return -1;
|
||||
};
|
||||
};
|
||||
|
||||
class BBLSliceInfo {
|
||||
|
||||
Reference in New Issue
Block a user