diff options
author | 2017-01-23 21:20:09 +0100 | |
---|---|---|
committer | 2017-01-25 22:17:47 +0100 | |
commit | 25152bd69a070aa7ba84248b368b0803e407272a (patch) | |
tree | 7a0704f433857e91cbda2cda93dca07e643e075a /src/lib/netlist/prg/nltool.cpp | |
parent | 093bda019317a5a66699b35f8b25ab73802f1f1c (diff) |
Netlist refactoring:
- Refactored netlist pmf code.
- Small optimization for diode calculations.
- Minor refactoring across the board. (nw)
Diffstat (limited to 'src/lib/netlist/prg/nltool.cpp')
-rw-r--r-- | src/lib/netlist/prg/nltool.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index 910f9078561..14b7409b95e 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -502,12 +502,30 @@ static const pstring pmf_verbose[] = }; #endif +struct tt +{ + void test(int a) {printf ("test :%d\n", a);} + int test1() { return 1;} +}; + +plib::pmfp<void, int> atest; +plib::pmfp<int> atest1; int main(int argc, char *argv[]) { tool_options_t opts; int ret; + tt x; + + atest.set(&tt::test, &x); + atest1.set(&tt::test1, &x); + + atest(1); + int a = atest1(); + + printf("%d\n", a); + //return 1 ; /* make SIGFPE actually deliver signals on supoorted platforms */ plib::fpsignalenabler::global_enable(true); plib::fpsignalenabler sigen(plib::FP_ALL & ~plib::FP_INEXACT & ~plib::FP_UNDERFLOW); |