Skip to content

Commit 4cbf2dd

Browse files
committed
tweaks to tighten
1 parent 4490b2b commit 4cbf2dd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

main.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void converged(HWND hwnd){
118118
auto double2 {get_txt_dbl(pData->txt2)};
119119
auto test_val {(std::max)(std::abs(double1),std::abs(double2))};
120120
auto epsilon {get_txt_dbl(pData->txtEpsilon) * test_val};
121-
auto is_converged = std::abs(double1 - double2) <= epsilon;
121+
auto is_converged {std::abs(double1 - double2) <= epsilon};
122122
wchar_t msg[20];
123123
swprintf_s(msg, L"Is converged: %d", is_converged);
124124
msg_box(hwnd, msg, L"Close enough?");
@@ -182,8 +182,7 @@ void draw_label(LPCWSTR label_text, int x, int y, HDC hdc){
182182

183183
bool is_mouse_in(HWND hWnd)
184184
{
185-
auto pData {get_bobwindow(hWnd)};
186-
switch (pData->inWindow)
185+
switch ((get_bobwindow(hWnd))->inWindow)
187186
{
188187
case 0:
189188
return false;
@@ -257,8 +256,7 @@ LRESULT CALLBACK window_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
257256
return 0;
258257
case WM_MOUSELEAVE:
259258
{
260-
auto pData {get_bobwindow(hwnd)};
261-
pData->inWindow = 0;
259+
(get_bobwindow(hwnd))->inWindow = 0;
262260
InvalidateRect(hwnd, &get_rect(), TRUE);
263261
UpdateWindow(hwnd);
264262

0 commit comments

Comments
 (0)