Skip to content

Commit

Permalink
[kde,win32] initDimensions() functions: Don't store the string tempor…
Browse files Browse the repository at this point in the history
…arily.

Inline the formatDimensions() call into the initString() call.

This doesn't affect the code size in either debug or release builds.
  • Loading branch information
GerbilSoft committed Feb 1, 2025
1 parent ff23009 commit f431875
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/kde/RomDataView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,7 @@ QLabel *RomDataViewPrivate::initDimensions(QLabel *lblDesc,
{
// Dimensions
const int *const dimensions = field.data.dimensions;
const QString str = formatDimensions(dimensions);
return initString(lblDesc, field, str);
return initString(lblDesc, field, formatDimensions(dimensions));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/win32/RP_ShellPropSheetExt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1324,8 +1324,8 @@ int RP_ShellPropSheetExt_Private::initDimensions(_In_ HWND hWndTab,
{
// TODO: 'x' or '×'? Using 'x' for now.
const int *const dimensions = field.data.dimensions;
const tstring tstr = formatDimensions(dimensions);
return initString(hWndTab, pt_start, size, field, fieldIdx, tstr.c_str());
return initString(hWndTab, pt_start, size, field, fieldIdx,
formatDimensions(dimensions).c_str());
}

/**
Expand Down

0 comments on commit f431875

Please sign in to comment.