Skip to content

Commit

Permalink
Improve export logger
Browse files Browse the repository at this point in the history
- Use `string_view` type instead of `LPCTSTR` for log writing
  - Addresses #258.
- Format text with indenting
- Print diagnostic messages normally not seen in release
  • Loading branch information
Gumball2415 committed Jan 1, 2025
1 parent ef3dd21 commit f1509e7
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 178 deletions.
6 changes: 6 additions & 0 deletions Dn-FamiTracker.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,9 @@
<ClCompile Include="Source\ConfigEmulation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Source\JsonExporter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Source\Exception.h">
Expand Down Expand Up @@ -1496,6 +1499,9 @@
<ClInclude Include="Source\rigtorp\SPSCQueue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Source\JsonExporter.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Dn-FamiTracker.rc">
Expand Down
1 change: 0 additions & 1 deletion Source/ChunkRenderText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ void CChunkRenderText::StoreFrameListChunk(CChunk *pChunk, CFile *pFile)
unsigned char bank = pChunk->GetBank();

// Pointers to frames
// str.Format("; Bank %i\n", pChunk->GetBank());
if (m_bBankSwitched)
StoreMusicBankSegment(bank, str);

Expand Down
4 changes: 2 additions & 2 deletions Source/CommandLineExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class CCommandLineLog : public CCompilerLog
{
public:
CCommandLineLog(std::string *pText) : m_pText(pText) {};
void WriteLog(LPCTSTR text)
void WriteLog(std::string_view text)
{
*m_pText += text;
*m_pText += std::string(text);
};
void Clear() {};
private:
Expand Down
Loading

0 comments on commit f1509e7

Please sign in to comment.