Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
22 lines
527 B
C++
22 lines
527 B
C++
#include "File/ShortcutFilename.h"
|
|
|
|
// OFFSET: 0x00DD9430
|
|
// FUNCTION: fn_23335
|
|
std::string ShortcutFilename(std::uint32_t identifier) {
|
|
std::string result;
|
|
constexpr char digits[] = "3867012495";
|
|
|
|
for (std::uint32_t divisor = 1000000000; divisor; divisor /= 10) {
|
|
if (!result.empty() && divisor == 100) {
|
|
result.push_back('-');
|
|
}
|
|
|
|
unsigned digit = identifier / divisor;
|
|
identifier %= divisor;
|
|
if (digit || !result.empty()) {
|
|
result.push_back(digits[digit]);
|
|
}
|
|
}
|
|
|
|
return result;
|
|
}
|