Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Albert Gräf
Gem
Commits
33d4707b
Commit
33d4707b
authored
Dec 06, 2017
by
IOhannes m zmölnig
Browse files
pass strings by reference
parent
88c6f14d
Changes
18
Hide whitespace changes
Inline
Side-by-side
src/Base/GemWindow.cpp
View file @
33d4707b
...
...
@@ -376,7 +376,7 @@ void GemWindow:: fsaaMess(int value) {
m_fsaa
=
value
;
}
void
GemWindow
::
titleMess
(
std
::
string
s
)
{
void
GemWindow
::
titleMess
(
const
std
::
string
&
s
)
{
m_title
=
s
;
}
void
GemWindow
::
borderMess
(
bool
on
)
{
...
...
@@ -391,7 +391,7 @@ void GemWindow:: offsetMess(int x, int y) {
m_yoffset
=
y
;
}
void
GemWindow
::
createMess
(
std
::
string
)
{
void
GemWindow
::
createMess
(
const
std
::
string
&
)
{
create
();
}
void
GemWindow
::
destroyMess
(
void
)
{
...
...
src/Base/GemWindow.h
View file @
33d4707b
...
...
@@ -177,14 +177,14 @@ class GEM_EXTERN GemWindow : public CPPExtern
virtual
void
transparentMess
(
bool
on
);
/* window decoration (pre creation) */
virtual
void
titleMess
(
std
::
string
);
virtual
void
titleMess
(
const
std
::
string
&
);
virtual
void
borderMess
(
bool
on
);
virtual
void
fullscreenMess
(
int
on
);
virtual
void
offsetMess
(
int
x
,
int
y
);
/* creation/destruction */
virtual
void
createMess
(
std
::
string
);
virtual
void
createMess
(
const
std
::
string
&
);
virtual
void
destroyMess
(
void
);
/* post creation */
...
...
src/Output/gemcocoawindow.h
View file @
33d4707b
...
...
@@ -30,7 +30,7 @@ class GEM_EXTERN gemcocoawindow : public GemWindow
virtual
bool
create
(
void
);
virtual
void
destroy
(
void
);
virtual
void
createMess
(
std
::
string
);
virtual
void
createMess
(
const
std
::
string
&
);
virtual
void
destroyMess
(
void
);
// check whether we have a window and if so, make it current
...
...
@@ -42,7 +42,7 @@ class GEM_EXTERN gemcocoawindow : public GemWindow
virtual
void
dispatch
(
void
);
void
dispatchEvent
(
NSEvent
*
);
virtual
void
titleMess
(
std
::
string
s
);
virtual
void
titleMess
(
const
std
::
string
&
s
);
virtual
void
dimensionsMess
(
unsigned
int
width
,
unsigned
int
height
);
virtual
void
offsetMess
(
int
x
,
int
y
);
virtual
void
fullscreenMess
(
int
on
);
...
...
src/Output/gemcocoawindow.mm
View file @
33d4707b
...
...
@@ -393,7 +393,7 @@ bool gemcocoawindow :: create(void)
bool
cgw
=
createGemWindow
();
return
cgw
;
}
void
gemcocoawindow
::
createMess
(
std
::
string
s
)
{
void
gemcocoawindow
::
createMess
(
const
std
::
string
&
s
)
{
if
(
m_pimpl
->
view
)
{
error
(
"window already made!"
);
return
;
...
...
@@ -419,7 +419,7 @@ void gemcocoawindow :: destroyMess(void)
/////////////////////////////////////////////////////////
// messages
void
gemcocoawindow
::
titleMess
(
std
::
string
s
)
{
void
gemcocoawindow
::
titleMess
(
const
std
::
string
&
s
)
{
m_title
=
s
;
if
(
m_pimpl
->
window
)
{
[
m_pimpl
->
window
setTitle
:[
NSString
stringWithUTF8String
:
m_title
.
c_str
()]];
...
...
src/Output/gemglfw2window.cpp
View file @
33d4707b
...
...
@@ -110,7 +110,7 @@ void gemglfw2window :: bufferMess(int buf)
// titleMess
//
/////////////////////////////////////////////////////////
void
gemglfw2window
::
titleMess
(
std
::
string
s
)
void
gemglfw2window
::
titleMess
(
const
std
::
string
&
s
)
{
m_title
=
s
;
if
(
makeCurrent
()){
...
...
@@ -236,7 +236,7 @@ bool gemglfw2window :: create(void)
dispatch
();
return
(
0
!=
s_window
);
}
void
gemglfw2window
::
createMess
(
std
::
string
)
{
void
gemglfw2window
::
createMess
(
const
std
::
string
&
)
{
create
();
}
...
...
src/Output/gemglfw2window.h
View file @
33d4707b
...
...
@@ -76,7 +76,7 @@ class GEM_EXTERN gemglfw2window : public GemWindow
virtual
void
bufferMess
(
int
buf
);
/* window decoration (pre creation) */
virtual
void
titleMess
(
std
::
string
s
);
virtual
void
titleMess
(
const
std
::
string
&
s
);
/* window position/dimension (pre creation) */
virtual
void
dimensionsMess
(
unsigned
int
width
,
unsigned
int
height
);
...
...
@@ -87,7 +87,7 @@ class GEM_EXTERN gemglfw2window : public GemWindow
virtual
bool
create
(
void
);
virtual
void
destroy
(
void
);
virtual
void
createMess
(
std
::
string
);
virtual
void
createMess
(
const
std
::
string
&
);
virtual
void
destroyMess
(
void
);
/* post creation */
...
...
src/Output/gemglfw3window.cpp
View file @
33d4707b
...
...
@@ -117,7 +117,7 @@ void gemglfw3window :: bufferMess(int buf)
// titleMess
//
/////////////////////////////////////////////////////////
void
gemglfw3window
::
titleMess
(
std
::
string
s
)
void
gemglfw3window
::
titleMess
(
const
std
::
string
&
s
)
{
m_title
=
s
;
if
(
makeCurrent
()){
...
...
@@ -263,7 +263,7 @@ bool gemglfw3window :: create(void)
dispatch
();
return
(
0
!=
m_window
);
}
void
gemglfw3window
::
createMess
(
std
::
string
)
{
void
gemglfw3window
::
createMess
(
const
std
::
string
&
)
{
create
();
}
...
...
src/Output/gemglfw3window.h
View file @
33d4707b
...
...
@@ -76,7 +76,7 @@ class GEM_EXTERN gemglfw3window : public GemWindow
virtual
void
bufferMess
(
int
buf
);
/* window decoration (pre creation) */
virtual
void
titleMess
(
std
::
string
s
);
virtual
void
titleMess
(
const
std
::
string
&
s
);
/* window position/dimension (pre creation) */
virtual
void
dimensionsMess
(
unsigned
int
width
,
unsigned
int
height
);
...
...
@@ -87,7 +87,7 @@ class GEM_EXTERN gemglfw3window : public GemWindow
virtual
bool
create
(
void
);
virtual
void
destroy
(
void
);
virtual
void
createMess
(
std
::
string
);
virtual
void
createMess
(
const
std
::
string
&
);
virtual
void
destroyMess
(
void
);
/* post creation */
...
...
src/Output/gemglutwindow.cpp
View file @
33d4707b
...
...
@@ -239,7 +239,7 @@ void gemglutwindow :: bufferMess(int buf)
// titleMess
//
/////////////////////////////////////////////////////////
void
gemglutwindow
::
titleMess
(
std
::
string
s
)
void
gemglutwindow
::
titleMess
(
const
std
::
string
&
s
)
{
m_title
=
s
;
if
(
makeCurrent
()){
...
...
@@ -390,7 +390,7 @@ bool gemglutwindow :: create(void)
dispatch
();
return
true
;
}
void
gemglutwindow
::
createMess
(
std
::
string
)
{
void
gemglutwindow
::
createMess
(
const
std
::
string
&
)
{
create
();
}
...
...
src/Output/gemglutwindow.h
View file @
33d4707b
...
...
@@ -76,7 +76,7 @@ class GEM_EXTERN gemglutwindow : public GemWindow
virtual
void
bufferMess
(
int
buf
);
/* window decoration (pre creation) */
virtual
void
titleMess
(
std
::
string
s
);
virtual
void
titleMess
(
const
std
::
string
&
s
);
/* window position/dimension (pre creation) */
virtual
void
dimensionsMess
(
unsigned
int
width
,
unsigned
int
height
);
...
...
@@ -87,7 +87,7 @@ class GEM_EXTERN gemglutwindow : public GemWindow
virtual
bool
create
(
void
);
virtual
void
destroy
(
void
);
virtual
void
createMess
(
std
::
string
);
virtual
void
createMess
(
const
std
::
string
&
);
virtual
void
destroyMess
(
void
);
/* post creation */
...
...
src/Output/gemglxwindow.cpp
View file @
33d4707b
...
...
@@ -806,7 +806,7 @@ void gemglxwindow :: bufferMess(int buf)
// titleMess
//
/////////////////////////////////////////////////////////
void
gemglxwindow
::
titleMess
(
std
::
string
s
)
void
gemglxwindow
::
titleMess
(
const
std
::
string
&
s
)
{
m_title
=
s
;
if
(
m_pimpl
->
dpy
&&
m_pimpl
->
win
)
{
...
...
@@ -918,7 +918,7 @@ bool gemglxwindow :: create(void)
titleMess
(
m_title
);
return
createGemWindow
();
}
void
gemglxwindow
::
createMess
(
std
::
string
display
)
void
gemglxwindow
::
createMess
(
const
std
::
string
&
display
)
{
if
(
m_pimpl
->
win
)
{
error
(
"window already made"
);
...
...
src/Output/gemglxwindow.h
View file @
33d4707b
...
...
@@ -85,13 +85,13 @@ class GEM_EXTERN gemglxwindow : public GemWindow
virtual
void
bufferMess
(
int
buf
);
/* window decoration (pre creation) */
virtual
void
titleMess
(
std
::
string
);
virtual
void
titleMess
(
const
std
::
string
&
);
/* window position/dimension (pre creation) */
virtual
void
dimensionsMess
(
unsigned
int
width
,
unsigned
int
height
);
/* creation/destruction */
virtual
void
createMess
(
std
::
string
);
virtual
void
createMess
(
const
std
::
string
&
);
virtual
void
destroyMess
(
void
);
/* post creation */
...
...
src/Output/gemmacwindow.cpp
View file @
33d4707b
...
...
@@ -1527,7 +1527,7 @@ OSStatus gemmacwindow::eventHandler (EventRef event)
// Messages
//
/////////////////////////////////////////////////////////
void
gemmacwindow
::
createMess
(
std
::
string
s
)
{
void
gemmacwindow
::
createMess
(
const
std
::
string
&
s
)
{
if
(
!
create
())
{
destroyMess
();
return
;
...
...
src/Output/gemmacwindow.h
View file @
33d4707b
...
...
@@ -83,7 +83,7 @@ class GEM_EXTERN gemmacwindow : public GemWindow
virtual
void
dispatch
(
void
);
/* creation/destruction */
virtual
void
createMess
(
std
::
string
);
virtual
void
createMess
(
const
std
::
string
&
);
virtual
void
destroyMess
(
void
);
/* decoration,... */
...
...
src/Output/gemsdlwindow.cpp
View file @
33d4707b
...
...
@@ -441,7 +441,7 @@ void gemsdlwindow :: bufferMess(int buf)
// titleMess
//
/////////////////////////////////////////////////////////
void
gemsdlwindow
::
titleMess
(
std
::
string
s
)
void
gemsdlwindow
::
titleMess
(
const
std
::
string
&
s
)
{
m_title
=
s
;
if
(
m_surface
)
{
...
...
@@ -555,7 +555,7 @@ bool gemsdlwindow :: create(void)
dispatch
();
return
true
;
}
void
gemsdlwindow
::
createMess
(
std
::
string
)
{
void
gemsdlwindow
::
createMess
(
const
std
::
string
&
)
{
create
();
}
...
...
src/Output/gemsdlwindow.h
View file @
33d4707b
...
...
@@ -77,7 +77,7 @@ class GEM_EXTERN gemsdlwindow : public GemWindow
void
bufferMess
(
int
buf
);
/* window decoration (pre creation) */
virtual
void
titleMess
(
std
::
string
s
);
virtual
void
titleMess
(
const
std
::
string
&
s
);
/* window position/dimension (pre creation) */
virtual
void
dimensionsMess
(
unsigned
int
width
,
unsigned
int
height
);
...
...
@@ -87,7 +87,7 @@ class GEM_EXTERN gemsdlwindow : public GemWindow
virtual
bool
create
(
void
);
virtual
void
destroy
(
void
);
virtual
void
createMess
(
std
::
string
);
virtual
void
createMess
(
const
std
::
string
&
);
virtual
void
destroyMess
(
void
);
/* post creation */
...
...
src/Output/gemw32window.cpp
View file @
33d4707b
...
...
@@ -369,7 +369,7 @@ bool gemw32window:: create(void)
position
(
x
,
y
);
return
createGemWindow
();
}
void
gemw32window
::
createMess
(
std
::
string
s
)
{
void
gemw32window
::
createMess
(
const
std
::
string
&
s
)
{
if
(
m_win
)
{
error
(
"window already made"
);
return
;
...
...
@@ -498,7 +498,7 @@ void gemw32window::move(void) {
}
}
void
gemw32window
::
titleMess
(
std
::
string
s
)
{
void
gemw32window
::
titleMess
(
const
std
::
string
&
s
)
{
m_title
=
s
;
if
(
m_win
)
SetWindowText
(
m_win
->
win
,
s
.
c_str
());
...
...
src/Output/gemw32window.h
View file @
33d4707b
...
...
@@ -90,12 +90,12 @@ class GEMW32WINDOW_EXTERN gemw32window : public GemWindow
LONG
WINAPI
event
(
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
void
move
(
void
);
virtual
void
createMess
(
std
::
string
);
virtual
void
createMess
(
const
std
::
string
&
);
virtual
void
dimensionsMess
(
unsigned
int
,
unsigned
int
);
virtual
void
offsetMess
(
int
,
int
);
virtual
void
cursorMess
(
bool
);
virtual
void
topmostMess
(
bool
);
virtual
void
titleMess
(
std
::
string
);
virtual
void
titleMess
(
const
std
::
string
&
);
virtual
void
fullscreenMess
(
int
);
private:
...
...
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