]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/block.h
Fix memory leaks and other bad stuff
[r2c2.git] / source / libmarklin / block.h
index 64f02e50b7babe2242de6dd9d023b0e1075862f9..b72215ae03d1608092fd0c41943fdea7b7abeb54 100644 (file)
@@ -42,12 +42,13 @@ private:
 public:
        Block(TrafficManager &, Track &);
 
+       unsigned get_id() const { return id; }
        unsigned get_sensor_id() const { return sensor_id; }
        unsigned get_turnout_id() const { return turnout_id; }
        const std::set<Track *> &get_tracks() const { return tracks; }
        const std::vector<Endpoint> &get_endpoints() const { return endpoints; }
        int get_endpoint_by_link(const Block &) const;
-       int traverse(unsigned, float * =0) const;
+       unsigned traverse(unsigned, float * =0) const;
        void check_link(Block &);
        Block *get_link(unsigned) const;
        bool reserve(const Train *);
@@ -55,8 +56,6 @@ public:
        void print_debug();
 private:
        void find_paths(Track &, unsigned, unsigned, std::set<Track *> &);
-
-       static unsigned next_id;
 };
 
 } // namespace Marklin