(svn r27363) -Codechange: Fix codestyle of one-line methods and header codestyle of derived structs.
This commit is contained in:
@@ -25,8 +25,15 @@ struct CYapfNodeKeyExitDir {
|
||||
m_exitdir = (m_td == INVALID_TRACKDIR) ? INVALID_DIAGDIR : TrackdirToExitdir(m_td);
|
||||
}
|
||||
|
||||
inline int CalcHash() const {return m_exitdir | (m_tile << 2);}
|
||||
inline bool operator==(const CYapfNodeKeyExitDir &other) const {return (m_tile == other.m_tile) && (m_exitdir == other.m_exitdir);}
|
||||
inline int CalcHash() const
|
||||
{
|
||||
return m_exitdir | (m_tile << 2);
|
||||
}
|
||||
|
||||
inline bool operator==(const CYapfNodeKeyExitDir &other) const
|
||||
{
|
||||
return m_tile == other.m_tile && m_exitdir == other.m_exitdir;
|
||||
}
|
||||
|
||||
void Dump(DumpTarget &dmp) const
|
||||
{
|
||||
@@ -38,8 +45,15 @@ struct CYapfNodeKeyExitDir {
|
||||
|
||||
struct CYapfNodeKeyTrackDir : public CYapfNodeKeyExitDir
|
||||
{
|
||||
inline int CalcHash() const {return m_td | (m_tile << 4);}
|
||||
inline bool operator==(const CYapfNodeKeyTrackDir &other) const {return (m_tile == other.m_tile) && (m_td == other.m_td);}
|
||||
inline int CalcHash() const
|
||||
{
|
||||
return m_td | (m_tile << 4);
|
||||
}
|
||||
|
||||
inline bool operator==(const CYapfNodeKeyTrackDir &other) const
|
||||
{
|
||||
return m_tile == other.m_tile && m_td == other.m_td;
|
||||
}
|
||||
};
|
||||
|
||||
/** Yapf Node base */
|
||||
@@ -63,14 +77,45 @@ struct CYapfNodeT {
|
||||
m_estimate = 0;
|
||||
}
|
||||
|
||||
inline Node *GetHashNext() {return m_hash_next;}
|
||||
inline void SetHashNext(Node *pNext) {m_hash_next = pNext;}
|
||||
inline TileIndex GetTile() const {return m_key.m_tile;}
|
||||
inline Trackdir GetTrackdir() const {return m_key.m_td;}
|
||||
inline const Tkey_& GetKey() const {return m_key;}
|
||||
inline int GetCost() const {return m_cost;}
|
||||
inline int GetCostEstimate() const {return m_estimate;}
|
||||
inline bool operator<(const Node &other) const {return m_estimate < other.m_estimate;}
|
||||
inline Node *GetHashNext()
|
||||
{
|
||||
return m_hash_next;
|
||||
}
|
||||
|
||||
inline void SetHashNext(Node *pNext)
|
||||
{
|
||||
m_hash_next = pNext;
|
||||
}
|
||||
|
||||
inline TileIndex GetTile() const
|
||||
{
|
||||
return m_key.m_tile;
|
||||
}
|
||||
|
||||
inline Trackdir GetTrackdir() const
|
||||
{
|
||||
return m_key.m_td;
|
||||
}
|
||||
|
||||
inline const Tkey_& GetKey() const
|
||||
{
|
||||
return m_key;
|
||||
}
|
||||
|
||||
inline int GetCost() const
|
||||
{
|
||||
return m_cost;
|
||||
}
|
||||
|
||||
inline int GetCostEstimate() const
|
||||
{
|
||||
return m_estimate;
|
||||
}
|
||||
|
||||
inline bool operator<(const Node &other) const
|
||||
{
|
||||
return m_estimate < other.m_estimate;
|
||||
}
|
||||
|
||||
void Dump(DumpTarget &dmp) const
|
||||
{
|
||||
|
Reference in New Issue
Block a user