Henri Verbeet : wined3d: Pass const resources to some resource functions.

Alexandre Julliard julliard at winehq.org
Tue Mar 1 11:07:15 CST 2011


Module: wine
Branch: master
Commit: 1674ca1ebdda0038155d449e9521849d1b50c5ca
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1674ca1ebdda0038155d449e9521849d1b50c5ca

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Mar  1 09:47:55 2011 +0100

wined3d: Pass const resources to some resource functions.

---

 dlls/wined3d/resource.c        |    8 ++++----
 dlls/wined3d/wined3d_private.h |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 2f18550..d43cdfa 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -131,7 +131,7 @@ void resource_unload(IWineD3DResourceImpl *resource)
             resource, resource->resource.resourceType);
 }
 
-static struct private_data *resource_find_private_data(IWineD3DResourceImpl *This, REFGUID tag)
+static struct private_data *resource_find_private_data(const struct IWineD3DResourceImpl *This, REFGUID tag)
 {
     struct private_data *data;
     struct list *entry;
@@ -193,7 +193,7 @@ HRESULT resource_set_private_data(struct IWineD3DResourceImpl *resource, REFGUID
     return WINED3D_OK;
 }
 
-HRESULT resource_get_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid, void *data, DWORD *data_size)
+HRESULT resource_get_private_data(const struct IWineD3DResourceImpl *resource, REFGUID guid, void *data, DWORD *data_size)
 {
     const struct private_data *d;
 
@@ -260,13 +260,13 @@ DWORD resource_set_priority(struct IWineD3DResourceImpl *resource, DWORD priorit
     return prev;
 }
 
-DWORD resource_get_priority(struct IWineD3DResourceImpl *resource)
+DWORD resource_get_priority(const struct IWineD3DResourceImpl *resource)
 {
     TRACE("resource %p, returning %u.\n", resource, resource->resource.priority);
     return resource->resource.priority;
 }
 
-WINED3DRESOURCETYPE resource_get_type(struct IWineD3DResourceImpl *resource)
+WINED3DRESOURCETYPE resource_get_type(const struct IWineD3DResourceImpl *resource)
 {
     TRACE("resource %p, returning %#x.\n", resource, resource->resource.resourceType);
     return resource->resource.resourceType;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a7db1ec..0cc9aaf 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1830,14 +1830,14 @@ typedef struct IWineD3DResourceImpl
 
 void resource_cleanup(struct IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN;
 HRESULT resource_free_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid) DECLSPEC_HIDDEN;
-DWORD resource_get_priority(struct IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN;
-HRESULT resource_get_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid,
+DWORD resource_get_priority(const struct IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN;
+HRESULT resource_get_private_data(const struct IWineD3DResourceImpl *resource, REFGUID guid,
         void *data, DWORD *data_size) DECLSPEC_HIDDEN;
 HRESULT resource_init(struct IWineD3DResourceImpl *resource, WINED3DRESOURCETYPE resource_type,
         IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format *format,
         WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops,
         const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
-WINED3DRESOURCETYPE resource_get_type(struct IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN;
+WINED3DRESOURCETYPE resource_get_type(const struct IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN;
 DWORD resource_set_priority(struct IWineD3DResourceImpl *resource, DWORD priority) DECLSPEC_HIDDEN;
 HRESULT resource_set_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid,
         const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN;




More information about the wine-cvs mailing list