[Freeciv-Dev] [bug #22026] is_native_move(): missing break in switch statement

2014-05-15 Thread pepeto
Update of bug #22026 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?22026

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #22026] is_native_move(): missing break in switch statement

2014-05-12 Thread pepeto
Update of bug #22026 (project freeciv):

 Assigned to:None = pepeto 


___

Reply to this item at:

  http://gna.org/bugs/?22026

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #22026] is_native_move(): missing break in switch statement

2014-05-09 Thread pepeto
Follow-up Comment #3, bug #22026 (project freeciv):

'const struct foo *' means a pointer to a read-only structure. The pointer can
be reassigned, but you cannot write to the memory.

'struct foo *const' means a constant pointer to a structure which can
modified.

If we were using the incorrect alternative, I bet that gcc would have
complained. So, it is safe to define this variable at the function scope.

___

Reply to this item at:

  http://gna.org/bugs/?22026

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #22026] is_native_move(): missing break in switch statement

2014-05-08 Thread pepeto
URL:
  http://gna.org/bugs/?22026

 Summary: is_native_move(): missing break in switch
statement
 Project: Freeciv
Submitted by: pepeto
Submitted on: Thu 08 May 2014 10:34:51 AM CEST
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: Ready For Test
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: trunk r24826
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.6.0

___

Details:

When reading is_native_move(), I noticed that breaks were missing to separate
cases in the switch statement.

The attached patch returns TRUE as soon as possible and reduce the huge number
of spaces used for the indentation.




___

File Attachments:


---
Date: Thu 08 May 2014 10:34:51 AM CEST  Name: is_native_move.diff  Size: 4kB  
By: pepeto

http://gna.org/bugs/download.php?file_id=20688

___

Reply to this item at:

  http://gna.org/bugs/?22026

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #22026] is_native_move(): missing break in switch statement

2014-05-08 Thread Emmet Hikory
Follow-up Comment #2, bug #22026 (project freeciv):

This code is much cleaner than the original implementation: thank you.  I'm a
little worried about declaring proad a const at function scope though, as the
value is changed in each iteration: should this not use a non-const struct
(and extra_road_get()), or to put the declaration of proad inside the
extra_type_list iteration?

___

Reply to this item at:

  http://gna.org/bugs/?22026

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev