Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
45
Issues
45
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
dcc4d090
Commit
dcc4d090
authored
Feb 22, 2011
by
ledig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] MSVC compile no rand_r there and global vars with same name are not good
parent
1032899a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
src/gui/qt4/networkEditor/WQtNetworkEditor.cpp
src/gui/qt4/networkEditor/WQtNetworkEditor.cpp
+5
-0
src/gui/qt4/networkEditor/WQtNetworkInputPort.cpp
src/gui/qt4/networkEditor/WQtNetworkInputPort.cpp
+2
-2
src/gui/qt4/networkEditor/WQtNetworkOutputPort.cpp
src/gui/qt4/networkEditor/WQtNetworkOutputPort.cpp
+2
-2
No files found.
src/gui/qt4/networkEditor/WQtNetworkEditor.cpp
View file @
dcc4d090
...
...
@@ -128,8 +128,13 @@ void WQtNetworkEditor::addModule( boost::shared_ptr< WModule > module )
// set the object at a random start position
time
(
&
m_time
);
#ifndef _MSC_VER
netItem
->
setPos
(
rand_r
(
(
unsigned
int
*
)
&
m_time
)
%
200
,
rand_r
(
(
unsigned
int
*
)
&
m_time
)
%
200
);
#else
netItem
->
setPos
(
(
rand
()
+
m_time
)
%
200
,
(
rand
()
+
m_time
)
%
200
);
#endif
m_scene
->
addItem
(
netItem
);
...
...
src/gui/qt4/networkEditor/WQtNetworkInputPort.cpp
View file @
dcc4d090
...
...
@@ -30,12 +30,12 @@
#include "WQtNetworkInputPort.h"
const
float
SIZE
=
10.0
;
const
float
W
SIZE
=
10.0
;
WQtNetworkInputPort
::
WQtNetworkInputPort
(
boost
::
shared_ptr
<
WModuleInputConnector
>
connector
)
:
WQtNetworkPort
()
{
setRect
(
0.0
,
0.0
,
SIZE
,
SIZE
);
setRect
(
0.0
,
0.0
,
WSIZE
,
W
SIZE
);
setBrush
(
Qt
::
gray
);
setPen
(
QPen
(
Qt
::
red
,
1
,
Qt
::
SolidLine
,
Qt
::
RoundCap
,
Qt
::
RoundJoin
)
);
...
...
src/gui/qt4/networkEditor/WQtNetworkOutputPort.cpp
View file @
dcc4d090
...
...
@@ -30,12 +30,12 @@
#include "WQtNetworkOutputPort.h"
const
float
SIZE
=
10.0
;
const
float
WSIZE2
=
10.0
;
WQtNetworkOutputPort
::
WQtNetworkOutputPort
(
boost
::
shared_ptr
<
WModuleOutputConnector
>
connector
)
:
WQtNetworkPort
()
{
setRect
(
0.0
,
0.0
,
SIZE
,
SIZE
);
setRect
(
0.0
,
0.0
,
WSIZE2
,
WSIZE2
);
setBrush
(
Qt
::
gray
);
setPen
(
QPen
(
Qt
::
red
,
1
,
Qt
::
SolidLine
,
Qt
::
RoundCap
,
Qt
::
RoundJoin
)
);
...
...
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