diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2017-02-23 16:49:49 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2017-02-23 16:49:49 -0500 |
commit | ae0b3149badf369eb2b1f10aba830eef8b4af9b4 (patch) | |
tree | 8ce8316e88f684a40879fa43cea3f37f7f16aaac /indra/llwindow | |
parent | 80a878a79289ba2245ad35e5ae67a0034d0271e3 (diff) |
DRTVWR-418: Fix a round of compile errors surfaced by -std=c++11.
These are mostly things that were in fact erroneous, but accepted by older
compilers.
This changeset has not yet been built with Visual Studio 2013 or Linux gcc,
even with -std=c++11.
This changeset has not been built *without* -std=c++11. It should be used in
conjunction with a corresponding change to LL_BUILD_DARWIN_BASE_SWITCHES in
viewer-build-variables/variables.
This is a work in progress. We do not assert that this changeset completes the
work needed to turn on -std=c++11, even on the Mac.
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 20 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx.cpp | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 22f3339cf1..c8c086d705 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -232,8 +232,8 @@ attributedStringInfo getSegments(NSAttributedString *str) NSOpenGLPFADoubleBuffer, NSOpenGLPFAClosestPolicy, NSOpenGLPFAAccelerated, - NSOpenGLPFASampleBuffers, (samples > 0 ? 1 : 0), - NSOpenGLPFASamples, samples, + NSOpenGLPFASampleBuffers, static_cast<NSOpenGLPixelFormatAttribute>(samples > 0 ? 1 : 0), + NSOpenGLPFASamples, static_cast<NSOpenGLPixelFormatAttribute>(samples), NSOpenGLPFAStencilSize, 8, NSOpenGLPFADepthSize, 24, NSOpenGLPFAAlphaSize, 8, @@ -370,8 +370,8 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void)mouseMoved:(NSEvent *)theEvent { float mouseDeltas[2] = { - [theEvent deltaX], - [theEvent deltaY] + float([theEvent deltaX]), + float([theEvent deltaY]) }; callDeltaUpdate(mouseDeltas, 0); @@ -391,8 +391,8 @@ attributedStringInfo getSegments(NSAttributedString *str) // The old CoreGraphics APIs we previously relied on are now flagged as obsolete. // NSEvent isn't obsolete, and provides us with the correct deltas. float mouseDeltas[2] = { - [theEvent deltaX], - [theEvent deltaY] + float([theEvent deltaX]), + float([theEvent deltaY]) }; callDeltaUpdate(mouseDeltas, 0); @@ -592,13 +592,13 @@ attributedStringInfo getSegments(NSAttributedString *str) if (mMarkedTextAllowed) { unsigned int selected[2] = { - selectedRange.location, - selectedRange.length + unsigned(selectedRange.location), + unsigned(selectedRange.length) }; unsigned int replacement[2] = { - replacementRange.location, - replacementRange.length + unsigned(replacementRange.location), + unsigned(replacementRange.length) }; int string_length = [aString length]; diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 754306b5d2..5fa55d0b1f 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -544,7 +544,7 @@ void getPreeditLocation(float *location, unsigned int length) preeditor->getPreeditLocation(length, &coord, &rect, NULL); - float c[4] = {coord.mX, coord.mY, 0, 0}; + float c[4] = {float(coord.mX), float(coord.mY), 0, 0}; convertRectToScreen(gWindowImplementation->getWindow(), c); @@ -899,7 +899,7 @@ BOOL LLWindowMacOSX::setPosition(const LLCoordScreen position) { if(mWindow) { - float pos[2] = {position.mX, position.mY}; + float pos[2] = {float(position.mX), float(position.mY)}; setWindowPos(mWindow, pos); } |