Skip to content

Commit 7759f0b

Browse files
authored
Merge pull request #84 from RoboCup-SSL/fix-utf
Fix utf
2 parents 21a730b + bf66733 commit 7759f0b

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ before_install:
3131
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap cartr/qt4 ; fi
3232
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap-pin cartr/qt4 ; fi
3333
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install qt@4 ; fi
34-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install [email protected] ; fi
35-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ode --with-double-precision ; fi
34+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew uninstall --ignore-dependencies python ; fi
35+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install protobuf ; fi
36+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap robotology/formulae ; fi
37+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install robotology/formulae/ode ; fi
3638

3739
install:
3840
# vartypes
@@ -50,4 +52,4 @@ script:
5052
- mkdir build && cd build
5153
- cmake ..
5254
- make
53-
- sudo make install
55+
- sudo make install

include/configwidget.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ using namespace VarTypes;
5050
#define DEF_VALUE(type,Type,name) \
5151
std::shared_ptr<VarTypes::Var##Type> v_##name; \
5252
inline type name() {return v_##name->get##Type();}
53+
54+
#define DEF_FIELD_VALUE(type,Type,name) \
55+
std::shared_ptr<VarTypes::Var##Type> v_DivA_##name; \
56+
std::shared_ptr<VarTypes::Var##Type> v_DivB_##name; \
57+
inline type name() {return (Division() == "Division A" ? v_DivA_##name: v_DivB_##name)->get##Type(); }
5358

59+
5460
#define DEF_ENUM(type,name) \
5561
std::shared_ptr<VarTypes::VarStringEnum> v_##name; \
5662
type name() {if(v_##name!=nullptr) return v_##name->getString();return * (new type);}

src/graphics.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,12 +518,14 @@ void CGraphics::initScene(int width,int height,dReal rc,dReal gc,dReal bc,bool f
518518
glLightfv (GL_LIGHT0, GL_POSITION, light_position);
519519

520520
if (fog) {
521-
GLfloat fogColor [4] = {fogr,fogg,fogb,1};
521+
GLfloat fogColor [4] = {static_cast<GLfloat>(fogr),
522+
static_cast<GLfloat>(fogg),
523+
static_cast<GLfloat>(fogb), 1};
522524
glFogi (GL_FOG_MODE, GL_EXP2); //set the fog mode to GL_EXP2
523525
glFogf(GL_FOG_START,5);
524526
glFogf(GL_FOG_END,10);
525527
glFogfv (GL_FOG_COLOR, fogColor); //set the fog color to our color chosen above
526-
glFogf (GL_FOG_DENSITY, fogdensity); //set the density to the value above
528+
glFogf (GL_FOG_DENSITY, static_cast<GLfloat>(fogdensity)); //set the density to the value above
527529
//glHint (GL_FOG_HINT, GL_NICEST); // set the fog to look the nicest, may slow down on older cards
528530
}
529531
}

src/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Copyright (C) 2011, Parsian Robotic Center (eew.aut.ac.ir/~parsian/grsim)
2121

2222
int main(int argc, char *argv[])
2323
{
24+
std::locale::global( std::locale( "" ) );
25+
2426
char** argend = argc + argv;
2527

2628
QCoreApplication::setOrganizationName("Parsian");

0 commit comments

Comments
 (0)