Skip to content

Commit

Permalink
Further consistency edit to return (?) on failure path in all Process…
Browse files Browse the repository at this point in the history
…Utils detection functions. Improve function comments in header.
  • Loading branch information
cadaver committed Jul 1, 2017
1 parent e602496 commit 3c9881f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Source/Urho3D/Core/ProcessUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ String GetPlatform()
#elif defined(__linux__)
return "Linux";
#else
return String::EMPTY;
return "(?)";
#endif
}

Expand Down Expand Up @@ -565,7 +565,7 @@ String GetLoginName()
}
}
#endif
return "(?)";
return "(?)";
}

String GetHostName()
Expand All @@ -580,7 +580,7 @@ String GetHostName()
if (GetComputerName(buffer, &len))
return buffer;
#endif
return "(?)";
return "(?)";
}

// Disable Windows OS version functionality when compiling mini version for Web, see https://github.com/urho3d/Urho3D/issues/1998
Expand Down Expand Up @@ -702,7 +702,7 @@ String GetOSVersion()
return version + " (Darwin kernel " + kernel_version[0] + "." + kernel_version[1] + "." + kernel_version[2] + ")";
}
#endif
return "(?)";
return "(?)";
}

}
8 changes: 4 additions & 4 deletions Source/Urho3D/Core/ProcessUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ URHO3D_API const Vector<String>& ParseArguments(int argc, char** argv);
URHO3D_API const Vector<String>& GetArguments();
/// Read input from the console window. Return empty if no input.
URHO3D_API String GetConsoleInput();
/// Return the runtime platform identifier.
/// Return the runtime platform identifier, or (?) if not identified.
URHO3D_API String GetPlatform();
/// Return the number of physical CPU cores.
URHO3D_API unsigned GetNumPhysicalCPUs();
Expand All @@ -69,12 +69,12 @@ URHO3D_API unsigned GetNumLogicalCPUs();
URHO3D_API void SetMiniDumpDir(const String& pathName);
/// Return minidump write location.
URHO3D_API String GetMiniDumpDir();
/// Return the total amount of useable memory.
/// Return the total amount of usable memory in bytes.
URHO3D_API unsigned long long GetTotalMemory();
/// Return the name of the currently logged in user.
/// Return the name of the currently logged in user, or (?) if not identified.
URHO3D_API String GetLoginName();
/// Return the name of the running machine.
URHO3D_API String GetHostName();
/// Return the version of the currently running OS.
/// Return the version of the currently running OS, or (?) if not identified.
URHO3D_API String GetOSVersion();
}

0 comments on commit 3c9881f

Please sign in to comment.