Make the the devInfoTypesStrings.at(type) exception safe

Wrap it in a function to make it exception safe.

Change-Id: I29835993ae4fe2b7aa1a7027fab88c05ba89e6e3
This commit is contained in:
Bill(Shuzhou) Liu
2024-06-25 10:03:33 -05:00
والد a3758f82dc
کامیت 7a617e6ef2
4فایلهای تغییر یافته به همراه56 افزوده شده و 47 حذف شده
@@ -261,6 +261,7 @@ class Device {
AMGpuMetricsPublicLatestTupl_t dev_copy_internal_to_external_metrics();
static const std::map<DevInfoTypes, const char*> devInfoTypesStrings;
static const char* get_type_string(DevInfoTypes type);
private:
std::shared_ptr<Monitor> monitor_;