Jeff Young
45ca0a5ab8
Avoid divide-by-zero.
2020-01-15 18:50:47 +00:00
Ian McInerney
415aaabc29
Fix return type in KIDIALOG
...
It was returned as a bool for some reason...
2020-01-15 18:29:15 +00:00
Mark Roszko
a80b2b7e39
KIDIALOG should ignore "cancel" for the do not show again option.
...
Fix #3734
2020-01-15 18:23:07 +00:00
Jeff Young
e42788a3eb
Avoid divide-by-zero.
2020-01-15 18:21:42 +00:00
Jeff Young
dcfb7cadce
Avoid divide-by-zero.
2020-01-15 18:21:42 +00:00
Ian McInerney
bc6139359b
Smoothen rotation in 3D viewer when crossing the 0-2pi line
...
Rotating to 0 when above pi would result in the board spinning back
through pi to get there. This led to jarring motion.
Also fix an issue added in b6f64815
where the board would rotate
2pi when crossing over the 0-2pi boundary.
2020-01-15 18:10:05 +00:00
Seth Hillbrand
e1be88aef0
Updating .gitignore to ignore temp artifacts
2020-01-15 10:08:32 -08:00
Jeff Young
32823a0855
Handle nullptr.
2020-01-15 17:51:48 +00:00
Jeff Young
0f4c56cbbd
Also catch null dereference in case wxASSERT was skipped.
2020-01-15 17:51:48 +00:00
Seth Hillbrand
6a47d0f507
RTree: Fix iterator in single branch trees
...
In a single branch tree, we need to verify that all leaves do not match
the input search before returning.
Fixes #3764 | https://gitlab.com/kicad/code/kicad/issues/3764
2020-01-14 10:42:04 -08:00
Jeff Young
1bdcb33f75
Handle error returns from lstat.
2020-01-13 20:16:42 +00:00
Jeff Young
9df2cfb328
More uninitialized variables.
2020-01-13 20:16:40 +00:00
Jeff Young
91d1508c16
Fix some Coverity identified issues.
2020-01-13 20:16:40 +00:00
Ian McInerney
3ab9db6ff1
Update cast in PNS since we are guaranteed to have text
...
We are guaranteed that the BOARD_ITEM will be a TEXTE_MODULE
since we have tested its type already, so just use a static_cast
to remove the overhead.
2020-01-13 19:42:49 +00:00
Jeff Young
aeba5c005f
Many callers of uni_forward are not expecting an exception.
...
Remove the throw and used a different mechanism to detect non-unicode.
2020-01-13 15:40:32 +00:00
Jeff Young
e4eedfa893
Catch exceptions from failed clone.
2020-01-13 15:27:16 +00:00
Jeff Young
ac096fdf99
Catch exceptions from a failed library load.
2020-01-13 15:27:16 +00:00
Jeff Young
d3c7bd3a88
Don't throw an exception you have no intention of catching.
2020-01-13 15:27:16 +00:00
Ian McInerney
81ee5edcaf
Test dynamic_cast for safety from future changes
2020-01-13 15:22:26 +00:00
Ian McInerney
33a40e788b
Add missing null check to library viewer control tool
2020-01-13 14:40:55 +00:00
Ian McInerney
34bc0a4e96
pcbnew_control: Replace C casts with C++ casting
2020-01-13 14:19:44 +00:00
Ian McInerney
e2853862e5
Cleanup redundant type casting
2020-01-13 14:00:45 +00:00
jean-pierre charras
b6f64815f4
3D viewer: normalize rotation angles between -2_PI and 2_PI.
...
Fixes #3761
https://gitlab.com/kicad/code/kicad/issues/3761
2020-01-13 14:30:49 +01:00
jean-pierre charras
c3fc98c31d
Fix a compil error.
...
Fixes #3763
https://gitlab.com/kicad/code/kicad/issues/3763
2020-01-13 08:59:57 +01:00
Ian McInerney
8fc434be19
Formatting change for dynamic cast tests
2020-01-13 01:48:57 +00:00
Ian McInerney
36f6b4a9b4
Clean up redundant dynamic casts
2020-01-13 01:39:08 +00:00
Jeff Young
94f8aafec5
Fix missing variable initialization.
2020-01-13 00:18:49 +00:00
Jeff Young
9e8a66a0a3
Don't try to clear memory if the bitmap has an invalid size.
2020-01-13 00:18:49 +00:00
Jeff Young
d24bd5c832
Fix a couple of Coverity issues.
2020-01-12 21:07:41 +00:00
Jeff Young
8d0f31f6f4
Clean a bunch of legacy code out of the Filter Selection dialog.
2020-01-12 20:53:56 +00:00
Jeff Young
127c66285b
Rename old DIALOG_BLOCK_OPTIONS to DIALOG_FILTER_SELECTION....
...
... which is what it has done for some time now.
2020-01-12 20:30:58 +00:00
Jeff Young
3a1585718f
Remove unnecessary casts (they're just casting to a superclass).
2020-01-12 20:26:07 +00:00
Jeff Young
836c1ea56e
Fix a bunch of un-caught boost::bad_pointer exceptions.
...
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.
Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
2020-01-12 19:55:00 +00:00
Jeff Young
cc573eed31
Patch crash bug when closing symbol properties dialog.
2020-01-12 19:55:00 +00:00
Ian McInerney
960b553a70
Cleanup type casting in EE toolbase
...
* Ensure the lib edit undo checks for pointer validity
* Assert that the frames are the correct type (satisfies coverity)
* Convert C casts to C++ casts
2020-01-12 19:47:13 +00:00
Ian McInerney
cd0d92956b
Use static cast in sch_view since type has been checked
2020-01-12 19:46:17 +00:00
Ian McInerney
b445ce6632
Clean up pointer casting
...
* Make note of when dynamic cast is actually needed
* Convert some to static cast when we know the type for sure
2020-01-12 19:45:37 +00:00
Ian McInerney
4ffbefb9dc
Use the layer from the module item instead
...
They are both from the same argument, but this one make coverity happy.
2020-01-12 19:39:39 +00:00
Seth Hillbrand
52bfdb9703
PNS: Assume the current line is a base before optimizing
...
We use the cost of the current line before trying to improve the pad
breakout cost when optimizing the smart pads
Fixes #3759 | https://gitlab.com/kicad/code/kicad/issues/3759
2020-01-12 11:08:46 -08:00
Ian McInerney
3346f812a9
Cleanup error handling in VRML export (from coverity scan)
2020-01-12 17:18:08 +00:00
Ian McInerney
00e58cd974
Fix unintialized values (from coverity scan)
2020-01-12 13:00:42 +00:00
Ian McInerney
ae91312416
Fix default pin orientation (from Coverity scan)
2020-01-12 11:55:03 +00:00
Seth Hillbrand
76c26d6ae1
Remove unneeded unique_ptr
...
The unique_ptr was useful when the original function took multiple paths
which could de-scope the pointer. Current use allowed potential
use-after-free. This is now re-written to pass pointer directly.
2020-01-11 17:29:12 -08:00
Seth Hillbrand
84d5d6c168
Eeschema: Return null in case of canceling placement
2020-01-11 17:02:55 -08:00
Jeff Young
b343391723
Code cleanup for readibility.
2020-01-11 21:30:48 +00:00
Jeff Young
116e3d6816
Fix missing member variable initialization.
2020-01-11 21:29:25 +00:00
Jeff Young
3d8150032f
Fix some uninitialized variables found by Coverity.
2020-01-11 21:29:25 +00:00
Jeff Young
2e509480a4
Fix guaranteed divide-by-zero error when called with correction of 0.
2020-01-11 21:29:25 +00:00
Jeff Young
715448611d
Fix potential divide-by-zero (from Coverity scan).
2020-01-11 21:29:25 +00:00
Jeff Young
1591d13839
Use static_cast since we've already checked the type.
...
This is faster and also keeps Coverity happy.
2020-01-11 21:29:25 +00:00