mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 13:55:38 +00:00
address review
This commit is contained in:
parent
24173a2140
commit
dda48d7606
|
@ -135,7 +135,7 @@ bool GameLoader::MissingAttrib(const GameLoader &loader, const Util::Config::Nod
|
|||
|
||||
GameLoader::File::ptr_t GameLoader::File::Create(const GameLoader &loader, const Util::Config::Node &file_node)
|
||||
{
|
||||
if (GameLoader::MissingAttrib(loader, file_node, "name") || GameLoader::MissingAttrib(loader, file_node, "offset"))
|
||||
if (GameLoader::MissingAttrib(loader, file_node, "name") | GameLoader::MissingAttrib(loader, file_node, "offset")) // no || to easier detect errors
|
||||
return ptr_t();
|
||||
ptr_t file = std::make_shared<File>();
|
||||
file->offset = file_node["offset"].ValueAs<uint32_t>();
|
||||
|
@ -159,7 +159,7 @@ bool GameLoader::File::operator==(const File &rhs) const
|
|||
|
||||
GameLoader::Region::ptr_t GameLoader::Region::Create(const GameLoader &loader, const Util::Config::Node ®ion_node)
|
||||
{
|
||||
if (GameLoader::MissingAttrib(loader, region_node, "name") || MissingAttrib(loader, region_node, "stride") | GameLoader::MissingAttrib(loader, region_node, "chunk_size"))
|
||||
if (GameLoader::MissingAttrib(loader, region_node, "name") | MissingAttrib(loader, region_node, "stride") | GameLoader::MissingAttrib(loader, region_node, "chunk_size")) // no || to easier detect errors
|
||||
return ptr_t();
|
||||
ptr_t region = std::make_shared<Region>();
|
||||
region->region_name = region_node["name"].Value<std::string>();
|
||||
|
|
|
@ -332,8 +332,7 @@ void CInputs::PrintHeader(const char *fmt, ...)
|
|||
va_end(vl);
|
||||
|
||||
puts(header);
|
||||
const size_t hs = strlen(header);
|
||||
for (size_t i = 0; i < hs; i++)
|
||||
for (size_t i = 0; i < strlen(header); i++)
|
||||
putchar('-');
|
||||
printf("\n\n");
|
||||
}
|
||||
|
|
|
@ -60,9 +60,7 @@ bool TCPSend::Send(const void * data, int length)
|
|||
|
||||
DPRINTF("Sending %i bytes\n", length);
|
||||
|
||||
int sent;
|
||||
|
||||
sent = SDLNet_TCP_Send(m_socket, &length, sizeof(int)); // pack the length at the start of transmission.
|
||||
int sent = SDLNet_TCP_Send(m_socket, &length, sizeof(int)); // pack the length at the start of transmission.
|
||||
|
||||
if (!length)
|
||||
return true; // 0 sized packet will blow our connex
|
||||
|
|
Loading…
Reference in a new issue