Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
c5d3376c
Commit
c5d3376c
authored
Sep 11, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed some 'magic numbers' into constants. Added const modifier in appropriate spots.
parent
cd568483
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
9 deletions
+14
-9
graphics_abstraction_layer.cpp
common/gal/graphics_abstraction_layer.cpp
+2
-3
worksheet.cpp
common/worksheet.cpp
+1
-1
schframe.cpp
eeschema/schframe.cpp
+1
-1
graphics_abstraction_layer.h
include/gal/graphics_abstraction_layer.h
+6
-0
painter.h
include/painter.h
+1
-1
wxEeschemaStruct.h
include/wxEeschemaStruct.h
+1
-1
wxstruct.h
include/wxstruct.h
+1
-1
selection_area.h
pcbnew/tools/selection_area.h
+1
-1
No files found.
common/gal/graphics_abstraction_layer.cpp
View file @
c5d3376c
...
...
@@ -29,7 +29,6 @@
#include <gal/graphics_abstraction_layer.h>
#include <gal/definitions.h>
using
namespace
KiGfx
;
GAL
::
GAL
()
:
...
...
@@ -41,7 +40,7 @@ GAL::GAL() :
SetFillColor
(
COLOR4D
(
0.0
,
0.0
,
0.0
,
0.0
)
);
SetStrokeColor
(
COLOR4D
(
1.0
,
1.0
,
1.0
,
1.0
)
);
SetZoomFactor
(
1.0
);
SetDepthRange
(
VECTOR2D
(
-
2048
,
2047
)
);
SetDepthRange
(
VECTOR2D
(
GAL
::
MIN_DEPTH
,
GAL
::
MAX_DEPTH
)
);
SetFlip
(
false
,
false
);
SetLineWidth
(
1.0
);
...
...
@@ -114,7 +113,7 @@ void GAL::DrawGrid()
// Draw the origin marker
double
origSize
=
static_cast
<
double
>
(
gridOriginMarkerSize
)
/
worldScale
;
SetLayerDepth
(
0.0
);
SetLayerDepth
(
GAL
::
GRID_DEPTH
);
SetIsFill
(
false
);
SetIsStroke
(
true
);
SetStrokeColor
(
COLOR4D
(
1.0
,
1.0
,
1.0
,
1.0
)
);
...
...
common/worksheet.cpp
View file @
c5d3376c
...
...
@@ -101,7 +101,7 @@ void EDA_DRAW_FRAME::DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWi
}
wxString
EDA_DRAW_FRAME
::
GetScreenDesc
()
wxString
EDA_DRAW_FRAME
::
GetScreenDesc
()
const
{
// Virtual function. In basic class, returns
// an empty string.
...
...
eeschema/schframe.cpp
View file @
c5d3376c
...
...
@@ -324,7 +324,7 @@ SCH_SCREEN* SCH_EDIT_FRAME::GetScreen() const
}
wxString
SCH_EDIT_FRAME
::
GetScreenDesc
()
wxString
SCH_EDIT_FRAME
::
GetScreenDesc
()
const
{
wxString
s
=
m_CurrentSheet
->
PathHumanReadable
();
...
...
include/gal/graphics_abstraction_layer.h
View file @
c5d3376c
...
...
@@ -818,6 +818,9 @@ public:
depthStack
.
pop
();
}
/// Depth level on which the grid is drawn
static
const
int
GRID_DEPTH
=
1024
;
protected
:
std
::
stack
<
double
>
depthStack
;
///< Stored depth values
VECTOR2D
screenSize
;
///< Screen size in screen coordinates
...
...
@@ -884,6 +887,9 @@ protected:
* @param aCursorSize is the size of the cursor.
*/
virtual
void
initCursor
(
int
aCursorSize
)
=
0
;
static
const
int
MIN_DEPTH
=
-
2048
;
static
const
int
MAX_DEPTH
=
2047
;
};
}
// namespace KiGfx
...
...
include/painter.h
View file @
c5d3376c
...
...
@@ -195,7 +195,7 @@ public:
* Returns pointer to current settings that are going to be used when drawing items.
* @return Current rendering settings.
*/
virtual
RENDER_SETTINGS
*
GetSettings
()
virtual
RENDER_SETTINGS
*
GetSettings
()
const
{
return
m_settings
;
}
...
...
include/wxEeschemaStruct.h
View file @
c5d3376c
...
...
@@ -356,7 +356,7 @@ public:
*/
void
OnModify
();
virtual
wxString
GetScreenDesc
();
virtual
wxString
GetScreenDesc
()
const
;
void
InstallConfigFrame
(
wxCommandEvent
&
event
);
...
...
include/wxstruct.h
View file @
c5d3376c
...
...
@@ -499,7 +499,7 @@ public:
EDA_DRAW_PANEL
*
GetCanvas
()
{
return
m_canvas
;
}
virtual
wxString
GetScreenDesc
();
virtual
wxString
GetScreenDesc
()
const
;
/**
* Function GetScreen
...
...
pcbnew/tools/selection_area.h
View file @
c5d3376c
...
...
@@ -63,7 +63,7 @@ public:
m_end
=
aEnd
;
}
void
Show
(
int
x
,
std
::
ostream
&
st
)
const
void
Show
(
int
x
,
std
::
ostream
&
st
)
const
{
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment