Add #[inline] attributes
This commit is contained in:
parent
6ecc5f5078
commit
75f828b04f
9 changed files with 59 additions and 0 deletions
|
|
@ -21,12 +21,14 @@ thread_local!(static COM_INITIALIZED: ComInitialized = {
|
|||
struct ComInitialized(*mut ());
|
||||
|
||||
impl Drop for ComInitialized {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
unsafe { ole32::CoUninitialize() };
|
||||
}
|
||||
}
|
||||
|
||||
/// Ensures that COM is initialized in this thread.
|
||||
#[inline]
|
||||
pub fn com_initialized() {
|
||||
COM_INITIALIZED.with(|_| {});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue