Check Point: Compiles to about 75%

This commit is contained in:
Cekis
2021-10-08 00:46:27 -04:00
parent f40e894442
commit 940972f67b
7 changed files with 16 additions and 16 deletions
@@ -709,7 +709,7 @@ void CityPathGraph::setLinkDistance ( float dist )
// we cast the addresses of all the neighbors to ints, multiply them
// by a random large prime number, then xor the bits together.
int CityPathGraph::getNeighborCode ( int whichNode ) const
int64_t CityPathGraph::getNeighborCode ( int whichNode ) const
{
CityPathNode const * node = _getNode(whichNode);
@@ -717,7 +717,7 @@ int CityPathGraph::getNeighborCode ( int whichNode ) const
int edgeCount = node->getEdgeCount();
int code = 0;
int32_t code = 0;
for(int i = 0; i < edgeCount; i++)
{
@@ -727,9 +727,9 @@ int CityPathGraph::getNeighborCode ( int whichNode ) const
if(neighbor == nullptr) continue;
int neighborInt = reinterpret_cast<int>(neighbor);
int64_t neighborInt = reinterpret_cast<int64_t>(neighbor);
int mungedInt = neighborInt * 1295183;
int64_t mungedInt = neighborInt * 1295183;
code ^= mungedInt;
}
@@ -84,7 +84,7 @@ public:
static float getLinkDistance ( void );
static void setLinkDistance ( float dist );
int getNeighborCode ( int whichNode ) const;
int64_t getNeighborCode ( int whichNode ) const;
protected:
@@ -100,7 +100,7 @@ public:
void snapToTerrain ( void );
int getNeighborCode ( void ) const;
int64_t getNeighborCode ( void ) const;
void setNeighborCode ( int newCode );
protected:
@@ -19,7 +19,7 @@ public:
FormattedString();
char const * sprintf(char const * format, ...);
char const * vsprintf(char const * format, va_list const & va);
char const * vsprintf(char const * format, va_list va);
private:
@@ -39,7 +39,7 @@ inline FormattedString<bufferSize>::FormattedString()
}
//-----------------------------------------------------------------------------
template <int32_t bufferSize>
template <int bufferSize>
inline char const * FormattedString<bufferSize>::sprintf(char const * const format, ...)
{
char const * result = nullptr;
@@ -55,8 +55,8 @@ inline char const * FormattedString<bufferSize>::sprintf(char const * const form
}
// ----------------------------------------------------------------------
template <int32_t bufferSize>
inline char const * FormattedString<bufferSize>::vsprintf(char const * const format, va_list const & va)
template <int bufferSize>
inline char const * FormattedString<bufferSize>::vsprintf(char const * const format, va_list va)
{
// Format the string
@@ -68,9 +68,9 @@ private:
friend class DB::BindableNetworkId;
private:
explicit NetworkId(int value); // catch people who incorrectly try to construct one of these from an int
// also makes constructing one of these from any other incorrect numeric type ambiguous
// private:
// explicit NetworkId(int32_t value); // catch people who incorrectly try to construct one of these from an int
// // also makes constructing one of these from any other incorrect numeric type ambiguous
};
// -----------------------------------------------------------------------
@@ -313,7 +313,7 @@ void AlterSchedulerNamespace::validateObject(Object const *object)
}
catch (...)
{ //lint !e1775 // catch block does not declare any exception // that's right: I want to catch it all.
WARNING(true, ("validateObject(): Object-derived class with address [%x] failed to return valid C++ type info; likely a deleted Object.", reinterpret_cast<unsigned int const>(object)));
WARNING(true, ("validateObject(): Object-derived class with address [%x] failed to return valid C++ type info; likely a deleted Object.", reinterpret_cast<unsigned int64_t const>(object)));
isInvalid = true;
}
}
@@ -208,7 +208,7 @@ PathSearchNode * PathSearchNode::getSearchNode( PathNode const * node )
PathSearchNode * searchNode = nullptr;
int mark = node->getMark(3);
int64_t mark = node->getMark(3);
if(mark != -1)
{
@@ -493,7 +493,7 @@ void PathSearch::cleanup ( void )
{
PathNode const * visitedNode = m_visitedNodes->at(i);
int mark = visitedNode->getMark(3);
int64_t mark = visitedNode->getMark(3);
if(mark != -1)
{