#39 angle2vec patch

open
nobody
Code (26)
5
2007-01-14
2007-01-14
philippecmartin
No

Hi,

I get an error trying to apply the patch:

[philippe@pcm include]$ patch < ../../rtb.patch
patching file Vector2D.h
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 51.
2 out of 2 hunks FAILED -- saving rejects to file Vector2D.h.rej

Thanks,

Philippe

Discussion

  • Logged In: YES
    user_id=863272
    Originator: NO

    Where did you get this patch?

     
  • Rogalosch
    Rogalosch
    2007-08-24

    Logged In: YES
    user_id=1051014
    Originator: NO

    Hi,
    i bet his patch looked like the attached patchfile. I needed this modification to compile cvs head.

    Index: Vector2D.h

    RCS file: /cvsroot/realtimebattle/RealTimeBattleNew/include/Vector2D.h,v
    retrieving revision 1.2
    diff -w -b -B -u -8 -p -r1.2 Vector2D.h
    --- Vector2D.h 20 Mar 2005 23:23:27 -0000 1.2
    +++ Vector2D.h 24 Aug 2007 21:23:36 -0000
    @@ -19,16 +19,21 @@ Inc., 59 Temple Place - Suite 330, Bosto

    #ifndef __VECTOR2D__
    #define __VECTOR2D__

    #include <iostream>

    using namespace std;

    +class Vector2D;
    +
    +double vec2angle(const Vector2D&);
    +Vector2D angle2vec(const double);
    +
    class Vector2D
    {
    public:
    Vector2D() { vector[0] = 0.0; vector[1] = 0.0; }
    Vector2D(const Vector2D& v) { vector[0] = v.vector[0]; vector[1] = v.vector[1]; }
    Vector2D(const double x, const double y) { vector[0] = x; vector[1] = y; }
    ~Vector2D() {}

     
  • Logged In: NO

    Hi Phillipe, the version in the CVS does not need this patch, it is already integrated.

    Regards

    Johannes Nicolai

     
  • Rogalosch
    Rogalosch
    2007-08-27

    Logged In: YES
    user_id=1051014
    Originator: NO

    Hi Johannes,
    are we talking about the same patch? I've downloaded the latest cvs version, compilation aborts with the error below.

    > ArenaBase.cc: In member function »bool ArenaBase::parse_arena_line(std::ifstream&, double&, int&, double&)«:
    > ArenaBase.cc:562: Fehler: »angle2vec« wurde in diesem Gültigkeitsbereich nicht definiert

    angle2vec is not defined in scope. I needed to apply my patch below to get it work.

    Regards
    Martin

     
  • Logged In: NO

    Sorry, perhaps I mixed up the patch.
    On my machine, the CVS version compiles, but I do not have the newest compiler.

    Regards

    Johannes

     
  • Rogalosch
    Rogalosch
    2007-08-27

    Logged In: YES
    user_id=1051014
    Originator: NO

    I am compiling with gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4). Perhaps someone should verify the problem and apply the patch as needed.