Cleanup additional warnings

This commit is contained in:
maik klein 2017-01-05 09:52:32 +01:00
parent 42c1f97ffc
commit 6bc682893c
3 changed files with 30 additions and 34 deletions

View file

@ -425,7 +425,6 @@ pub trait DeviceV1_0 {
create_info: &vk::PipelineLayoutCreateInfo,
allocation_callbacks: Option<&vk::AllocationCallbacks>)
-> VkResult<vk::PipelineLayout> {
unsafe {
let mut pipeline_layout = mem::uninitialized();
let err_code = self.fp_v1_0()
.create_pipeline_layout(self.handle(),
@ -437,7 +436,6 @@ pub trait DeviceV1_0 {
_ => Err(err_code),
}
}
}
unsafe fn map_memory<T>(&self,
memory: vk::DeviceMemory,
@ -466,7 +464,6 @@ pub trait DeviceV1_0 {
create_info: &vk::FramebufferCreateInfo,
allocation_callbacks: Option<&vk::AllocationCallbacks>)
-> VkResult<vk::Framebuffer> {
unsafe {
let mut framebuffer = mem::uninitialized();
let err_code = self.fp_v1_0()
.create_framebuffer(self.handle(),
@ -478,7 +475,6 @@ pub trait DeviceV1_0 {
_ => Err(err_code),
}
}
}
unsafe fn get_device_queue(&self,
queue_family_index: vk::uint32_t,

View file

@ -1,11 +1,10 @@
#![allow(dead_code)]
use prelude::*;
use std::mem;
use instance::Instance;
use entry::Entry;
use vk;
use std::ffi::CStr;
use ::RawPtr;
use version::{V1_0, EntryV1_0};
use version::{EntryV1_0, InstanceV1_0};
#[derive(Clone)]
pub struct DebugReport {
@ -14,8 +13,8 @@ pub struct DebugReport {
}
impl DebugReport {
pub fn new(entry: &Entry<V1_0>,
instance: &Instance<V1_0>)
pub fn new<E: EntryV1_0, I: InstanceV1_0>(entry: &E,
instance: &I)
-> Result<DebugReport, Vec<&'static str>> {
let debug_report_fn = vk::DebugReportFn::load(|name| {
unsafe {

View file

@ -1,3 +1,4 @@
#![allow(dead_code)]
use prelude::*;
use std::ptr;
use std::mem;