Author Topic: [r7915] error in player/simplay.cc  (Read 697 times)

0 Members and 1 Guest are viewing this topic.

Offline captain crunch

[r7915] error in player/simplay.cc
« on: October 15, 2016, 10:08:07 AM »
I get an error when compiling simutrans with clang 3.5.0 on linux with SDL:
Code: [Select]
player/simplay.cc:545:22: error: 'waytype_t' is not a class, namespace, or
      scoped enumeration
                                                waytype_t wt = waytype_t...

Removing the namespace selector seems to fix this.
Code: [Select]
diff --git a/player/simplay.cc b/player/simplay.cc
index 4dcf0b7..7e81267 100644
--- a/player/simplay.cc
+++ b/player/simplay.cc
@@ -542,7 +542,7 @@ void player_t::ai_bankrupt()
  obj_t *obj = gr->obj_bei(i);
  if(obj->get_owner()==this) {
  sint32 costs = 0;
- waytype_t wt = waytype_t::ignore_wt;
+ waytype_t wt = ignore_wt;
  switch(obj->get_typ()) {
  case obj_t::roadsign:
  case obj_t::signal:

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4224
  • Total likes: 168
  • Helpful: 148
  • Languages: EN, DE, AT
Re: [r7915] error in player/simplay.cc
« Reply #1 on: October 15, 2016, 10:36:19 AM »
already fixed in 7916
Parsley, sage, rosemary, and maggikraut.

Offline DrSuperGood

Re: [r7915] error in player/simplay.cc
« Reply #2 on: October 15, 2016, 03:50:18 PM »
It appears that I accidently used a C++11 language feature (enum constants are in the scope of the enum type). This was not caught because I program with MSVC2015 which supports C++11. Sorry for any inconvenience this caused.

EDIT:
Commit 7192 introduced a build error for MSVC. This has now been fixed.
« Last Edit: October 15, 2016, 11:54:06 PM by DrSuperGood »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4224
  • Total likes: 168
  • Helpful: 148
  • Languages: EN, DE, AT
Re: [r7915] error in player/simplay.cc
« Reply #3 on: October 16, 2016, 06:44:11 AM »
thank you
Parsley, sage, rosemary, and maggikraut.