File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434#include < vxCpuLib.h>
3535#endif
3636
37- #include < boost/lexical_cast.hpp>
38-
3937#include < fstream>
4038#include < string>
4139#include < set>
@@ -548,12 +546,22 @@ namespace boost
548546 value = thread_detail::string_trim ( value );
549547
550548 if (key == physical_id) {
551- current_core_entry.first = boost::lexical_cast<unsigned >(value);
549+
550+ if ( !thread_detail::string_to_unsigned ( value, current_core_entry.first ) )
551+ {
552+ return hardware_concurrency ();
553+ }
554+
552555 continue ;
553556 }
554557
555558 if (key == core_id) {
556- current_core_entry.second = boost::lexical_cast<unsigned >(value);
559+
560+ if ( !thread_detail::string_to_unsigned ( value, current_core_entry.second ) )
561+ {
562+ return hardware_concurrency ();
563+ }
564+
557565 cores.insert (current_core_entry);
558566 continue ;
559567 }
You can’t perform that action at this time.
0 commit comments