diff options
author | Ed Tanous <edtanous@google.com> | 2021-10-10 00:49:28 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2021-10-18 02:00:44 +0300 |
commit | f201ffb46cec98eba672a06d06951117e3829013 (patch) | |
tree | 89c2cac86e0f0672c42d16829bb8fc4804221669 /redfish-core/lib/processor.hpp | |
parent | 962cbe3b30560c8f000b4ada0f5ecdd54edead7d (diff) | |
download | bmcweb-f201ffb46cec98eba672a06d06951117e3829013.tar.xz |
Define hex helper utils
This commit attempts to optimize some code and reduce our dependence on
boost libraries, as the coding standard recommends. It does this by
introducing a new method, intToHexString, which is a greatly simplified
"to hex" converter that doesn't require std::locale, or stream buffers,
and is very efficient. This deletes our need for boost::format, as well
as our need for boost::lexical_cast, both of which are fairly heavy
libraries.
Tested:
Unit tests pass.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I3b0f6eeb10256f87320adcc0ae9396f6bcbc8740
Diffstat (limited to 'redfish-core/lib/processor.hpp')
-rw-r--r-- | redfish-core/lib/processor.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp index d976264fb8..59b7ff29d7 100644 --- a/redfish-core/lib/processor.hpp +++ b/redfish-core/lib/processor.hpp @@ -177,7 +177,7 @@ inline void { aResp->res .jsonValue["ProcessorId"]["IdentificationRegisters"] = - boost::lexical_cast<std::string>(*value); + "0x" + intToHexString(*value); } } } |