Merge ~mitya57/compiz:typo into compiz:master

Proposed by Dmitry Shachnev
Status: Merged
Approved by: Alberts Muktupāvels
Approved revision: 3c872634db0db4476e35d8c713fd320b5e1e8165
Merged at revision: bed9c78d1c4eab0b7496c232e7b712562933f9e6
Proposed branch: ~mitya57/compiz:typo
Merge into: compiz:master
Diff against target: 85 lines (+0/-40)
2 files modified
compizconfig/gsettings/gsettings_backend_shared/ccs_gsettings_wrapper_factory.c (+0/-14)
compizconfig/libcompizconfig/src/ccs_backend_loader.c (+0/-26)
Reviewer Review Type Date Requested Status
Alberts Muktupāvels Approve
Compiz Maintainers Pending
Review via email: mp+390763@code.launchpad.net

Commit message

Remove unused empty private structs.

Description of the change

Remove unused empty private structs.

To post a comment you must log in.
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Looks good, but is this private needed? Struct is empty...

review: Approve
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Good question! Looks it's just some boilerplate copied, and we can safely remove it. Also found another similar empty struct.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/compizconfig/gsettings/gsettings_backend_shared/ccs_gsettings_wrapper_factory.c b/compizconfig/gsettings/gsettings_backend_shared/ccs_gsettings_wrapper_factory.c
2index 0e17bac..7f3897c 100644
3--- a/compizconfig/gsettings/gsettings_backend_shared/ccs_gsettings_wrapper_factory.c
4+++ b/compizconfig/gsettings/gsettings_backend_shared/ccs_gsettings_wrapper_factory.c
5@@ -27,11 +27,6 @@
6 #include "ccs_gsettings_interface_wrapper.h"
7
8 /* CCSGSettingsWrapperFactory implementation */
9-typedef struct _CCSGSettingsWrapperFactoryPrivate CCSGSettingsWrapperFactoryPrivate;
10-struct _CCSGSettingsWrapperFactoryPrivate
11-{
12-};
13-
14 static void
15 ccsGSettingsWrapperDefaultImplFree (CCSGSettingsWrapperFactory *wrapperFactory)
16 {
17@@ -78,17 +73,8 @@ ccsGSettingsWrapperFactoryDefaultImplNew (CCSObjectAllocationInterface *ai)
18 if (!wrapperFactory)
19 return NULL;
20
21- CCSGSettingsWrapperFactoryPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSGSettingsWrapperFactoryPrivate));
22-
23- if (!priv)
24- {
25- (*ai->free_) (ai->allocator, wrapperFactory);
26- return NULL;
27- }
28-
29 ccsObjectInit (wrapperFactory, ai);
30 ccsObjectAddInterface (wrapperFactory, (const CCSInterface *) &ccsGSettingsWrapperFactoryInterface, GET_INTERFACE_TYPE (CCSGSettingsWrapperFactoryInterface));
31- ccsObjectSetPrivate (wrapperFactory, (CCSPrivate *) priv);
32
33 ccsGSettingsWrapperFactoryRef (wrapperFactory);
34
35diff --git a/compizconfig/libcompizconfig/src/ccs_backend_loader.c b/compizconfig/libcompizconfig/src/ccs_backend_loader.c
36index 9798e4e..f4de45f 100644
37--- a/compizconfig/libcompizconfig/src/ccs_backend_loader.c
38+++ b/compizconfig/libcompizconfig/src/ccs_backend_loader.c
39@@ -38,12 +38,6 @@
40 #include <ccs_backend_loader_interface.h>
41 #include <ccs_backend_loader.h>
42
43-typedef struct _CCSShraedLibBackendLoaderPrivate CCSShraedLibBackendLoaderPrivate;
44-
45-struct _CCSShraedLibBackendLoaderPrivate
46-{
47-};
48-
49 static void *
50 openBackend (const char *backend)
51 {
52@@ -209,20 +203,6 @@ allocateLoader (CCSObjectAllocationInterface *ai)
53 return loader;
54 }
55
56-static CCSShraedLibBackendLoaderPrivate *
57-backendLoaderAllocatePrivate (CCSBackendLoader *loader, CCSObjectAllocationInterface *ai)
58-{
59- CCSShraedLibBackendLoaderPrivate *priv = (*ai->calloc_) (ai->allocator, 1, sizeof (CCSShraedLibBackendLoaderPrivate));
60-
61- if (!priv)
62- {
63- freeAndFinalizeLoader (loader, ai);
64- return NULL;
65- }
66-
67- return priv;
68-}
69-
70 CCSBackendLoader *
71 ccsSharedLibBackendLoaderNew (CCSObjectAllocationInterface *ai)
72 {
73@@ -231,12 +211,6 @@ ccsSharedLibBackendLoaderNew (CCSObjectAllocationInterface *ai)
74 if (!loader)
75 return NULL;
76
77- CCSShraedLibBackendLoaderPrivate *priv = backendLoaderAllocatePrivate (loader, ai);
78-
79- if (!priv)
80- return NULL;
81-
82- ccsObjectSetPrivate (loader, (CCSPrivate *) (priv));
83 ccsObjectAddInterface (loader, (const CCSInterface *) &ccsSharedLibBackendLoaderInterface,
84 GET_INTERFACE_TYPE (CCSBackendLoaderInterface));
85 ccsObjectRef (loader);

Subscribers

People subscribed via source and target branches