Skip to content

Commit

Permalink
Make static items to an unnamed namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
10110111 committed Jan 25, 2025
1 parent 2cab699 commit 8d7e4d7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/StelSplashScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,24 @@
#include <QPainter>
#include <cmath>

static constexpr int BASE_FONT_SIZE = 11;
static constexpr int BASE_PIXMAP_HEIGHT = 365;

SplashScreen::SplashScreenWidget* SplashScreen::instance;

static QPixmap makePixmap(const double sizeRatio)
namespace
{

constexpr int BASE_FONT_SIZE = 11;
constexpr int BASE_PIXMAP_HEIGHT = 365;

QPixmap makePixmap(const double sizeRatio)
{
QPixmap pixmap(StelFileMgr::findFile("data/splash.png"));
pixmap = pixmap.scaledToHeight(std::lround(BASE_PIXMAP_HEIGHT * sizeRatio),
Qt::SmoothTransformation);
return pixmap;
}

}

void SplashScreen::present(const double sizeRatio)
{
Q_ASSERT(!instance);
Expand Down

0 comments on commit 8d7e4d7

Please sign in to comment.