Skip to content

Commit

Permalink
Fix issues introduced in 5135590
Browse files Browse the repository at this point in the history
  • Loading branch information
lhecker committed Jun 2, 2022
1 parent b45ec69 commit c95b1a4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/inc/til/point.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
out.Y = y;
return S_OK;
}
return HRESULT_FROM_WIN32(ERROR_UNHANDLED_EXCEPTION);
RETURN_WIN32(ERROR_UNHANDLED_EXCEPTION);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/inc/til/rect.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
out.Bottom = b;
return S_OK;
}
return HRESULT_FROM_WIN32(ERROR_UNHANDLED_EXCEPTION);
RETURN_WIN32(ERROR_UNHANDLED_EXCEPTION);
}

namespace details
Expand Down Expand Up @@ -791,7 +791,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
out.Bottom = b;
return S_OK;
}
return HRESULT_FROM_WIN32(ERROR_UNHANDLED_EXCEPTION);
RETURN_WIN32(ERROR_UNHANDLED_EXCEPTION);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/inc/til/size.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
out.Y = y;
return S_OK;
}
return HRESULT_FROM_WIN32(ERROR_UNHANDLED_EXCEPTION);
RETURN_WIN32(ERROR_UNHANDLED_EXCEPTION);

This comment has been minimized.

Copy link
@DHowett

DHowett Jun 2, 2022

Member

i feel like there's a much better HRESULT for this than "win32 unhandled exception"; perhaps E_BOUNDS or WIN32(ERROR_ARITHMETIC_OVERFLOW)?

}
};

Expand Down
4 changes: 2 additions & 2 deletions src/server/ApiDispatchers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@
RETURN_IF_FAILED(pObjectHandle->GetScreenBuffer(GENERIC_READ, &pObj));

auto size = til::wrap_coord_size(a->FontSize);
const auto hr = m->_pApiRoutines->GetConsoleFontSizeImpl(*pObj, a->FontIndex, size);
RETURN_IF_FAILED(m->_pApiRoutines->GetConsoleFontSizeImpl(*pObj, a->FontIndex, size));
return til::unwrap_coord_size_hr(size, a->FontSize);
}

Expand Down Expand Up @@ -1231,7 +1231,7 @@
RETURN_IF_FAILED(pObjectHandle->GetScreenBuffer(GENERIC_WRITE, &pObj));

auto size = til::wrap_coord_size(a->ScreenBufferDimensions);
const auto hr = m->_pApiRoutines->SetConsoleDisplayModeImpl(*pObj, a->dwFlags, size);
RETURN_IF_FAILED(m->_pApiRoutines->SetConsoleDisplayModeImpl(*pObj, a->dwFlags, size));
return til::unwrap_coord_size_hr(size, a->ScreenBufferDimensions);
}

Expand Down

0 comments on commit c95b1a4

Please sign in to comment.