declare real calc_percent()'s code just once
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5355 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
3e2eef6cc2
commit
fb217c5b5c
1 changed files with 4 additions and 3 deletions
|
@ -68,13 +68,14 @@ static int dbd_size, dbd_pos, dbd_srcpos, dbd_fulllen;
|
||||||
static int m_length;
|
static int m_length;
|
||||||
static int m_pos;
|
static int m_pos;
|
||||||
|
|
||||||
|
#define _calc_percent() (MulDiv(min(m_pos,m_length),100,m_length))
|
||||||
#ifdef NSIS_COMPRESS_WHOLE
|
#ifdef NSIS_COMPRESS_WHOLE
|
||||||
int NSISCALL calc_percent()
|
static int NSISCALL calc_percent()
|
||||||
{
|
{
|
||||||
return MulDiv(min(m_pos,m_length),100,m_length);
|
return _calc_percent();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define calc_percent() (MulDiv(min(m_pos,m_length),100,m_length))
|
#define calc_percent() _calc_percent()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue