Merge lp:~vanvugt/compiz/fix-1067234 into lp:compiz/0.9.9

Proposed by Sam Spilsbury
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3421
Merged at revision: 3426
Proposed branch: lp:~vanvugt/compiz/fix-1067234
Merge into: lp:compiz/0.9.9
Diff against target: 146 lines (+1/-119)
2 files modified
src/point/CMakeLists.txt (+1/-9)
src/point/include/core/point.h (+0/-110)
To merge this branch: bzr merge lp:~vanvugt/compiz/fix-1067234
Reviewer Review Type Date Requested Status
Compiz Maintainers Pending
PS Jenkins bot continuous-integration Pending
Review via email: mp+129885@code.launchpad.net

This proposal supersedes a proposal from 2012-10-16.

Commit message

Remove duplicate point.h (LP: #1067234)

I had to keep the copy in include/ rather than the one in src/ because it's
used by include/core/{window,screen}.h. Doing it the other way around caused
pain and complication.

Description of the change

Remove duplicate point.h (LP: #1067234)

I had to keep the copy in include/ rather than the one in src/ because it's
used by include/core/{window,screen}.h. Doing it the other way around caused
pain and complication.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Dunno what's up with those test failures - they are completely unrelated. Lets see if it fails again.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/point/CMakeLists.txt'
--- src/point/CMakeLists.txt 2012-01-23 17:46:28 +0000
+++ src/point/CMakeLists.txt 2012-10-16 13:21:38 +0000
@@ -5,16 +5,8 @@
5)5)
66
7INCLUDE_DIRECTORIES ( 7INCLUDE_DIRECTORIES (
8 ${CMAKE_CURRENT_SOURCE_DIR}/include
9 ${CMAKE_CURRENT_SOURCE_DIR}/src
10
11 ${CMAKE_CURRENT_SOURCE_DIR}/point/include
12 ${CMAKE_CURRENT_SOURCE_DIR}/point/src
13
14 ${compiz_SOURCE_DIR}/include8 ${compiz_SOURCE_DIR}/include
15
16 ${Boost_INCLUDE_DIRS}9 ${Boost_INCLUDE_DIRS}
17
18 ${GLIBMM_INCLUDE_DIRS}10 ${GLIBMM_INCLUDE_DIRS}
19)11)
2012
@@ -22,7 +14,7 @@
2214
23SET ( 15SET (
24 PUBLIC_HEADERS 16 PUBLIC_HEADERS
25 ${CMAKE_CURRENT_SOURCE_DIR}/include/core/point.h17 ${compiz_SOURCE_DIR}/include/core/point.h
26)18)
2719
28SET ( 20SET (
2921
=== removed directory 'src/point/include'
=== removed directory 'src/point/include/core'
=== removed file 'src/point/include/core/point.h'
--- src/point/include/core/point.h 2012-01-19 19:16:27 +0000
+++ src/point/include/core/point.h 1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
1/*
2 * Copyright © 2008 Dennis Kasprzyk
3 *
4 * Permission to use, copy, modify, distribute, and sell this software
5 * and its documentation for any purpose is hereby granted without
6 * fee, provided that the above copyright notice appear in all copies
7 * and that both that copyright notice and this permission notice
8 * appear in supporting documentation, and that the name of
9 * Dennis Kasprzyk not be used in advertising or publicity pertaining to
10 * distribution of the software without specific, written prior permission.
11 * Dennis Kasprzyk makes no representations about the suitability of this
12 * software for any purpose. It is provided "as is" without express or
13 * implied warranty.
14 *
15 * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
17 * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
19 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
20 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
21 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 *
23 * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
24 */
25
26#ifndef _COMPPOINT_H
27#define _COMPPOINT_H
28
29#include <vector>
30#include <list>
31
32/**
33 * A 2D coordinate (likely in screen space) that can only be mutated
34 * through set() methods, since it's data members are private.
35 */
36class CompPoint {
37
38 public:
39 CompPoint ();
40 CompPoint (int, int);
41
42 /**
43 * Get the x coordinate of this point
44 */
45 int x () const;
46
47 /**
48 * Get the y coordinate of this point
49 */
50 int y () const;
51
52 /**
53 * Set the x and y coordinate of this point
54 */
55 void set (int, int);
56
57 /**
58 * Set the x coordinate of this point
59 */
60 void setX (int);
61
62 /**
63 * Set the y coordinate of this point
64 */
65 void setY (int);
66
67 bool operator== (const CompPoint &) const;
68 bool operator!= (const CompPoint &) const;
69
70 /**
71 * Takes from both co-ordinates
72 */
73 CompPoint & operator-= (const CompPoint &);
74 /**
75 * Adds to both co-ordinates
76 */
77 CompPoint & operator+= (const CompPoint &);
78
79 /**
80 * Retuns an added point
81 */
82 CompPoint operator+ (const CompPoint &) const;
83 /**
84 * Returns a subtracted point
85 */
86 CompPoint operator- (const CompPoint &) const;
87
88 typedef std::vector<CompPoint> vector;
89 typedef std::vector<CompPoint *> ptrVector;
90 typedef std::list<CompPoint> list;
91 typedef std::list<CompPoint *> ptrList;
92
93 private:
94 int mX, mY;
95};
96
97inline int
98CompPoint::x () const
99{
100 return mX;
101}
102
103inline int
104CompPoint::y () const
105{
106 return mY;
107}
108
109
110#endif

Subscribers

People subscribed via source and target branches