Remove dead code and reformat
This commit is contained in:
		
							parent
							
								
									9d29e5d87a
								
							
						
					
					
						commit
						d8c97da087
					
				@ -30,7 +30,18 @@ struct _Restriction {
 | 
			
		||||
    NodeID fromNode;
 | 
			
		||||
    NodeID toNode;
 | 
			
		||||
    struct Bits { //mostly unused
 | 
			
		||||
        Bits() : isOnly(false), unused1(false), unused2(false), unused3(false), unused4(false), unused5(false), unused6(false), unused7(false) {}
 | 
			
		||||
        Bits() :
 | 
			
		||||
            isOnly(false),
 | 
			
		||||
            unused1(false),
 | 
			
		||||
            unused2(false),
 | 
			
		||||
            unused3(false),
 | 
			
		||||
            unused4(false),
 | 
			
		||||
            unused5(false),
 | 
			
		||||
            unused6(false),
 | 
			
		||||
            unused7(false) {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        bool isOnly:1;
 | 
			
		||||
        bool unused1:1;
 | 
			
		||||
        bool unused2:1;
 | 
			
		||||
@ -41,14 +52,21 @@ struct _Restriction {
 | 
			
		||||
        bool unused7:1;
 | 
			
		||||
    } flags;
 | 
			
		||||
 | 
			
		||||
    _Restriction(NodeID vn) : viaNode(vn), fromNode(UINT_MAX), toNode(UINT_MAX) { }
 | 
			
		||||
    _Restriction(bool isOnly = false) : viaNode(UINT_MAX), fromNode(UINT_MAX), toNode(UINT_MAX) {
 | 
			
		||||
    _Restriction(NodeID vn) :
 | 
			
		||||
        viaNode(vn),
 | 
			
		||||
        fromNode(UINT_MAX),
 | 
			
		||||
        toNode(UINT_MAX) {
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    _Restriction(const bool isOnly = false) :
 | 
			
		||||
        viaNode(UINT_MAX),
 | 
			
		||||
        fromNode(UINT_MAX),
 | 
			
		||||
        toNode(UINT_MAX) {
 | 
			
		||||
        flags.isOnly = isOnly;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
inline bool CmpRestrictionByFrom ( _Restriction a, _Restriction b) { return (a.fromNode < b.fromNode);  }
 | 
			
		||||
 | 
			
		||||
struct _RawRestrictionContainer {
 | 
			
		||||
    _Restriction restriction;
 | 
			
		||||
    EdgeID fromWay;
 | 
			
		||||
@ -66,7 +84,7 @@ struct _RawRestrictionContainer {
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct CmpRestrictionContainerByFrom: public std::binary_function<_RawRestrictionContainer, _RawRestrictionContainer, bool> {
 | 
			
		||||
struct CmpRestrictionContainerByFrom : public std::binary_function<_RawRestrictionContainer, _RawRestrictionContainer, bool> {
 | 
			
		||||
    typedef _RawRestrictionContainer value_type;
 | 
			
		||||
    bool operator ()  (const _RawRestrictionContainer & a, const _RawRestrictionContainer & b) const {
 | 
			
		||||
        return a.fromWay < b.fromWay;
 | 
			
		||||
@ -92,6 +110,4 @@ struct CmpRestrictionContainerByTo: public std::binary_function<_RawRestrictionC
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* RESTRICTION_H_ */
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user