@@ -31,13 +31,13 @@ Offsets prepareOffsets(std::list<ClassInfo>& classes)
3131 {
3232 if (!function.linuxIndex .has_value ())
3333 {
34- // std::cerr << std ::format("Warning: function {} has no linuxIndex value", function.name) << std::endl;
34+ // std::cerr << fmt ::format("Warning: function {} has no linuxIndex value", function.name) << std::endl;
3535 continue ;
3636 }
3737
3838 if (!function.windowsIndex .has_value ())
3939 {
40- // std::cerr << std ::format("Warning: function {} has no windowsIndex value", function.name) << std::endl;
40+ // std::cerr << fmt ::format("Warning: function {} has no windowsIndex value", function.name) << std::endl;
4141 continue ;
4242 }
4343
@@ -55,21 +55,21 @@ std::optional<int> getOffset(Offsets offsets, const std::string& symbol)
5555 auto functionNameStartPos = symbol.rfind (" ::" );
5656 if (functionNameStartPos == std::string::npos)
5757 {
58- std::cerr << std ::format (" Error: incorrect format of symbol {} (missing \' ::\' separator)" , symbol) << std::endl;
58+ std::cerr << fmt ::format (" Error: incorrect format of symbol {} (missing \' ::\' separator)" , symbol) << std::endl;
5959 return std::nullopt ;
6060 }
6161
6262 auto systemNameStartPos = symbol.rfind (' .' );
6363 if (systemNameStartPos == std::string::npos)
6464 {
65- std::cerr << std ::format (" Error: incorrect format of symbol {} (missing \' .\' separator)" , symbol) << std::endl;
65+ std::cerr << fmt ::format (" Error: incorrect format of symbol {} (missing \' .\' separator)" , symbol) << std::endl;
6666 return std::nullopt ;
6767 }
6868
6969 auto namespaceStartPos = symbol.find (" ::" );
7070 if (namespaceStartPos == std::string::npos)
7171 {
72- std::cerr << std ::format (" Error: incorrect format of symbol {} (missing \' ::\' separator)" , symbol) << std::endl;
72+ std::cerr << fmt ::format (" Error: incorrect format of symbol {} (missing \' ::\' separator)" , symbol) << std::endl;
7373 return std::nullopt ;
7474 }
7575
@@ -81,23 +81,23 @@ std::optional<int> getOffset(Offsets offsets, const std::string& symbol)
8181 auto classVTablesIterator = offsets.find (className);
8282 if (classVTablesIterator == offsets.end ())
8383 {
84- std::cerr << std ::format (" Error: failed to find class vtable by its name \' {}\' )" , className) << std::endl;
84+ std::cerr << fmt ::format (" Error: failed to find class vtable by its name \' {}\' )" , className) << std::endl;
8585 return std::nullopt ;
8686 }
8787 const auto & classVTables = classVTablesIterator->second ;
8888
8989 auto classNamespaceIterator = classVTables.find (namespaceName);
9090 if (classNamespaceIterator == classVTables.end ())
9191 {
92- std::cerr << std ::format (" Error: failed to find class namespace by its name \' {}\' )" , namespaceName) << std::endl;
92+ std::cerr << fmt ::format (" Error: failed to find class namespace by its name \' {}\' )" , namespaceName) << std::endl;
9393 return std::nullopt ;
9494 }
9595 const auto & classNamespace = classNamespaceIterator->second ;
9696
9797 auto functionIterator = classNamespace.find (functionName);
9898 if (functionIterator == classNamespace.end ())
9999 {
100- std::cerr << std ::format (" Error: failed to find function by its name \' {}\' " , functionName) << std::endl;
100+ std::cerr << fmt ::format (" Error: failed to find function by its name \' {}\' " , functionName) << std::endl;
101101 return std::nullopt ;
102102 }
103103 const auto & function = functionIterator->second ;
@@ -126,14 +126,14 @@ int writeGamedataFile(std::list<ClassInfo>& classes, const std::vector<std::file
126126
127127 if (inputFileExtension != inputFileExtensionString)
128128 {
129- std::cerr << std ::format (" Error: input file {} doesn't contain correct file extension {}" , inputFilePath.string (), inputFileExtension.string ()) << std::endl;
129+ std::cerr << fmt ::format (" Error: input file {} doesn't contain correct file extension {}" , inputFilePath.string (), inputFileExtension.string ()) << std::endl;
130130 return EXIT_FAILURE ;
131131 }
132132
133133 std::ifstream inputStream (inputFilePath);
134134 if (!inputStream)
135135 {
136- std::cerr << std ::format (" Error: input file {} open failed - {}" , inputFilePath.string (), std::strerror (errno)) << std::endl;
136+ std::cerr << fmt ::format (" Error: input file {} open failed - {}" , inputFilePath.string (), std::strerror (errno)) << std::endl;
137137 return EXIT_FAILURE ;
138138 }
139139
@@ -144,7 +144,7 @@ int writeGamedataFile(std::list<ClassInfo>& classes, const std::vector<std::file
144144
145145 if (!std::filesystem::exists (outputFileDir))
146146 {
147- std::cerr << std ::format (" Error: failed to create {} directory" , outputFileDir.string (), std::strerror (errno)) << std::endl;
147+ std::cerr << fmt ::format (" Error: failed to create {} directory" , outputFileDir.string (), std::strerror (errno)) << std::endl;
148148 return EXIT_FAILURE ;
149149 }
150150
@@ -153,7 +153,7 @@ int writeGamedataFile(std::list<ClassInfo>& classes, const std::vector<std::file
153153 std::ofstream outputStream (outputFile);
154154 if (!outputStream)
155155 {
156- std::cerr << std ::format (" Error: output file {} open failed - {}" , outputFile.string (), std::strerror (errno)) << std::endl;
156+ std::cerr << fmt ::format (" Error: output file {} open failed - {}" , outputFile.string (), std::strerror (errno)) << std::endl;
157157 return EXIT_FAILURE ;
158158 }
159159
@@ -169,21 +169,21 @@ int writeGamedataFile(std::list<ClassInfo>& classes, const std::vector<std::file
169169 auto endPos = line.rfind (' #' );
170170 if (endPos == startPos)
171171 {
172- std::cerr << std ::format (" Error: input file {} contains only one \' #\' at line {}" , inputFilePath.string (), lineNumber) << std::endl;
172+ std::cerr << fmt ::format (" Error: input file {} contains only one \' #\' at line {}" , inputFilePath.string (), lineNumber) << std::endl;
173173 return EINVAL ;
174174 }
175175
176176 auto symbol = line.substr (startPos + 1 , endPos - startPos - 1 );
177177 if (symbol.empty ())
178178 {
179- std::cerr << std ::format (" Error: symbol from input file {} at line {} is empty somehow" , inputFilePath.string (), lineNumber) << std::endl;
179+ std::cerr << fmt ::format (" Error: symbol from input file {} at line {} is empty somehow" , inputFilePath.string (), lineNumber) << std::endl;
180180 return EINVAL ;
181181 }
182182
183183 auto offset = getOffset (offsets, symbol);
184184 if (!offset.has_value ())
185185 {
186- std::cerr << std ::format (" Error: failed to get offset of symbol {} from input file {} at line {}" , symbol, inputFilePath.string (), lineNumber) << std::endl;
186+ std::cerr << fmt ::format (" Error: failed to get offset of symbol {} from input file {} at line {}" , symbol, inputFilePath.string (), lineNumber) << std::endl;
187187 return EINVAL ;
188188 }
189189
0 commit comments