Mercurial > hg > octave-nkf
comparison src/graphics.cc @ 13830:462b5f556346
avoid uninitialized variable warning from valgrind
* graphics.cc (axes::properties::update_axes_layout):
Call update_ticklengths at end so that nearhoriz and other variables
are initialized first.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 05 Nov 2011 03:06:01 -0400 |
parents | 7ee18dc46bbb |
children | b4b8e525dee0 |
comparison
equal
deleted
inserted
replaced
13829:8e25d6d1db10 | 13830:462b5f556346 |
---|---|
4700 | 4700 |
4701 unwind_protect frame; | 4701 unwind_protect frame; |
4702 frame.protect_var (updating_axes_layout); | 4702 frame.protect_var (updating_axes_layout); |
4703 updating_axes_layout = true; | 4703 updating_axes_layout = true; |
4704 | 4704 |
4705 update_ticklengths (); | |
4706 | |
4707 xySym = (xd*yd*(xPlane-xPlaneN)*(yPlane-yPlaneN) > 0); | 4705 xySym = (xd*yd*(xPlane-xPlaneN)*(yPlane-yPlaneN) > 0); |
4708 zSign = (zd*(zPlane-zPlaneN) <= 0); | 4706 zSign = (zd*(zPlane-zPlaneN) <= 0); |
4709 xyzSym = zSign ? xySym : !xySym; | 4707 xyzSym = zSign ? xySym : !xySym; |
4710 xpTick = (zSign ? xPlaneN : xPlane); | 4708 xpTick = (zSign ? xPlaneN : xPlane); |
4711 ypTick = (zSign ? yPlaneN : yPlane); | 4709 ypTick = (zSign ? yPlaneN : yPlane); |
4747 zpTick = zPlane; | 4745 zpTick = zPlane; |
4748 } | 4746 } |
4749 | 4747 |
4750 Matrix viewmat = get_view ().matrix_value (); | 4748 Matrix viewmat = get_view ().matrix_value (); |
4751 nearhoriz = std::abs(viewmat(1)) <= 5; | 4749 nearhoriz = std::abs(viewmat(1)) <= 5; |
4750 | |
4751 update_ticklengths (); | |
4752 } | 4752 } |
4753 | 4753 |
4754 void | 4754 void |
4755 axes::properties::update_ticklengths (void) | 4755 axes::properties::update_ticklengths (void) |
4756 { | 4756 { |