mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove snake_case in core folder
This commit is contained in:
parent
11e28b5262
commit
28edbf9116
|
@ -13,7 +13,7 @@
|
|||
#include <functional>
|
||||
|
||||
template<class ForwardIt, class T, class Compare = std::less<>>
|
||||
ForwardIt binary_find(ForwardIt first, ForwardIt last, const T& value, Compare comp = {})
|
||||
ForwardIt BinaryFind(ForwardIt first, ForwardIt last, const T& value, Compare comp = {})
|
||||
{
|
||||
first = std::lower_bound(first, last, value, comp);
|
||||
return first != last && !comp(value, *first) ? first : last;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
namespace Http
|
||||
{
|
||||
static size_t writeData(const char* src, size_t size, size_t nmemb, void* userdata)
|
||||
static size_t WriteData(const char* src, size_t size, size_t nmemb, void* userdata)
|
||||
{
|
||||
size_t realsize = size * nmemb;
|
||||
Response* res = static_cast<Response*>(userdata);
|
||||
|
@ -38,7 +38,7 @@ namespace Http
|
|||
return realsize;
|
||||
}
|
||||
|
||||
static size_t header_callback(const char* src, size_t size, size_t nitems, void* userdata)
|
||||
static size_t HeaderCallback(const char* src, size_t size, size_t nitems, void* userdata)
|
||||
{
|
||||
size_t realsize = nitems * size;
|
||||
Response* res = static_cast<Response*>(userdata);
|
||||
|
@ -62,7 +62,7 @@ namespace Http
|
|||
size_t sizeleft;
|
||||
};
|
||||
|
||||
static size_t read_callback(void* dst, size_t size, size_t nmemb, void* userp)
|
||||
static size_t ReadCallback(void* dst, size_t size, size_t nmemb, void* userp)
|
||||
{
|
||||
WriteThis* wt = static_cast<WriteThis*>(userp);
|
||||
size_t buffer_size = size * nmemb;
|
||||
|
@ -98,7 +98,7 @@ namespace Http
|
|||
wt.readptr = req.body.c_str();
|
||||
wt.sizeleft = req.body.size();
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, ReadCallback);
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, &wt);
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast<long>(wt.sizeleft));
|
||||
}
|
||||
|
@ -114,9 +114,9 @@ namespace Http
|
|||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, req.url.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writeData);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteData);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, static_cast<void*>(&res));
|
||||
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
|
||||
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, HeaderCallback);
|
||||
curl_easy_setopt(curl, CURLOPT_HEADERDATA, static_cast<void*>(&res));
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, true);
|
||||
|
|
|
@ -292,7 +292,7 @@ static void AddToFreeList(EntityId index)
|
|||
static void RemoveFromEntityList(EntityBase* entity)
|
||||
{
|
||||
auto& list = gEntityLists[EnumValue(entity->Type)];
|
||||
auto ptr = binary_find(std::begin(list), std::end(list), entity->sprite_index);
|
||||
auto ptr = BinaryFind(std::begin(list), std::end(list), entity->sprite_index);
|
||||
if (ptr != std::end(list))
|
||||
{
|
||||
list.erase(ptr);
|
||||
|
@ -365,7 +365,7 @@ EntityBase* CreateEntity(EntityType type)
|
|||
|
||||
EntityBase* CreateEntityAt(const EntityId index, const EntityType type)
|
||||
{
|
||||
auto id = binary_find(std::rbegin(_freeIdList), std::rend(_freeIdList), index);
|
||||
auto id = BinaryFind(std::rbegin(_freeIdList), std::rend(_freeIdList), index);
|
||||
if (id == std::rend(_freeIdList))
|
||||
{
|
||||
return nullptr;
|
||||
|
@ -422,7 +422,7 @@ static void EntitySpatialRemove(EntityBase* entity)
|
|||
{
|
||||
size_t currentIndex = GetSpatialIndexOffset({ entity->x, entity->y });
|
||||
auto& spatialVector = gEntitySpatialIndex[currentIndex];
|
||||
auto index = binary_find(std::begin(spatialVector), std::end(spatialVector), entity->sprite_index);
|
||||
auto index = BinaryFind(std::begin(spatialVector), std::end(spatialVector), entity->sprite_index);
|
||||
if (index != std::end(spatialVector))
|
||||
{
|
||||
spatialVector.erase(index, index + 1);
|
||||
|
|
|
@ -57,7 +57,7 @@ bool PatrolArea::Get(const TileCoordsXY& pos) const
|
|||
if (area == nullptr)
|
||||
return false;
|
||||
|
||||
auto it = binary_find(area->SortedTiles.begin(), area->SortedTiles.end(), pos, CompareTileCoordsXY);
|
||||
auto it = BinaryFind(area->SortedTiles.begin(), area->SortedTiles.end(), pos, CompareTileCoordsXY);
|
||||
auto found = it != area->SortedTiles.end();
|
||||
return found;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue