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
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index d976264..59b7ff2 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -177,7 +177,7 @@
{
aResp->res
.jsonValue["ProcessorId"]["IdentificationRegisters"] =
- boost::lexical_cast<std::string>(*value);
+ "0x" + intToHexString(*value);
}
}
}