FIX: safe the ams_id traverse

jira: [none]
Change-Id: I58b7769f843f3dbef8b51a15768711257f590dba
(cherry picked from commit f0efb9af0d1f5df72f2b43d8ffef581d177c49a4)
This commit is contained in:
xin.zhang
2025-01-11 14:14:15 +08:00
committed by Noisyfox
parent 1a27e545a6
commit c04d50f885
3 changed files with 19 additions and 5 deletions

View File

@@ -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 {