summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pstring.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2016-06-16 00:01:47 +0200
committer couriersud <couriersud@arcor.de>2016-06-16 00:01:47 +0200
commit404e589cff3123bd146e8339570cd07869b2e91b (patch)
tree99a1a99e8f061178ff398a30da181184a8621110 /src/lib/netlist/plib/pstring.cpp
parent809de6dd7ff20bcb2a214596bb9232825e944524 (diff)
Merge netlist_dev branch, all code_refactoring: (nw)
Object model optimisation. Merge remote-tracking branch 'origin/master' into netlist_dev Fix a merge issue. #if ==> #elif. Ouch. Default PHAS_PMF_INTERNAL=0 for 32bit windows mingw. Change UINT8 to uint_[fast|least|8_t. Move state_var so it can be used by base devices as well. Remove last traces of ATTR_ALIGN. Refactored netlist_time into a template. Removed implicit double assignment to netlist. Doomed to produce bugs. Instead, use netlist_time::from_double. Switch to using proper (i.e. bool type) param_logic_t. Formally differentiate between logic inputs (e.g. switches) and int inputs (e.g. resistor ladders or selection switches). Added parameter USE_DEACTIVATE to truthtable devices. Added more constexpr to netlist_time. Fixed some ifdef code paths. - More c++. - Simplify main processing loop. As a nice side-effect that squeezed out some cycles. - More cycle squeezing. - Removed pvector_t. - Use std::sort. - Refactored netlist state manager. - Introduction of state_var object template to be used on device state members. - Changed remaining save occurrences to state_var. - Rewrote nltool's listdevices command. This allowed removal of one member from devices which served solely for listdevices. - Remove hashmap_t. Fix kidniki regression.
Diffstat (limited to 'src/lib/netlist/plib/pstring.cpp')
-rw-r--r--src/lib/netlist/plib/pstring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/netlist/plib/pstring.cpp b/src/lib/netlist/plib/pstring.cpp
index cb8011734b4..f6dff95fb12 100644
--- a/src/lib/netlist/plib/pstring.cpp
+++ b/src/lib/netlist/plib/pstring.cpp
@@ -374,8 +374,8 @@ pstr_t *pstring_t<F>::salloc(int n)
if (stk == nullptr)
stk = plib::palloc_array<std::stack<pstr_t *>>(17);
pstr_t *p;
- unsigned sn= ((32 - countleadbits(n)) + 1) / 2;
- unsigned size = sizeof(pstr_t) + ((UINT64) 1<<(sn * 2)) + 1;
+ std::size_t sn= ((32 - countleadbits(n)) + 1) / 2;
+ std::size_t size = sizeof(pstr_t) + ((std::size_t) 1<<(sn * 2)) + 1;
if (stk[sn].empty())
p = (pstr_t *) plib::palloc_array<char>(size);
else