Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsansnom05 <sansnom05@users.sourceforge.net>2010-10-03 04:21:10 +0400
committersansnom05 <sansnom05@users.sourceforge.net>2010-10-03 04:21:10 +0400
commit246c5f2fc332702a4cdd91860a41ccb1e1a5a83e (patch)
tree652ac4d7899eb50abc5339b86f53af27a4ae356f /src/DSUtil/DSUtil.h
parentcc9c54a96be95ee8a6aa6bb0a60d6e08e6bbc33d (diff)
-fixed one memory leak
-small cleanup git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2663 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/DSUtil/DSUtil.h')
-rw-r--r--src/DSUtil/DSUtil.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/DSUtil/DSUtil.h b/src/DSUtil/DSUtil.h
index 731f53862..891f86940 100644
--- a/src/DSUtil/DSUtil.h
+++ b/src/DSUtil/DSUtil.h
@@ -217,3 +217,15 @@ static CUnknown* WINAPI CreateInstance(LPUNKNOWN lpunk, HRESULT* phr)
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
+
+inline int LNKO(int a, int b)
+{
+ if(a == 0 || b == 0)
+ return(1);
+ while(a != b)
+ {
+ if(a < b) b -= a;
+ else if(a > b) a -= b;
+ }
+ return(a);
+}