mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-01-19 08:52:34 +01:00
added this helper
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40283
This commit is contained in:
parent
3b6dee2782
commit
941d4c066f
@ -1,12 +1,12 @@
|
|||||||
/* ======== SourceMM ========
|
/* ======== SourceMM ========
|
||||||
* Copyright (C) 2004-2005 Metamod:Source Development Team
|
* Copyright (C) 2004-2006 Metamod:Source Development Team
|
||||||
* No warranties of any kind
|
* No warranties of any kind
|
||||||
*
|
*
|
||||||
* License: zlib/libpng
|
* License: zlib/libpng
|
||||||
*
|
*
|
||||||
* Author(s): Pavol "PM OnoTo" Marko
|
* Author(s): Pavol "PM OnoTo" Marko
|
||||||
* ============================
|
* ============================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SH_STACK_H__
|
#ifndef __SH_STACK_H__
|
||||||
#define __SH_STACK_H__
|
#define __SH_STACK_H__
|
||||||
@ -159,11 +159,17 @@ namespace SourceHook
|
|||||||
m_Elements[m_UsedSize++] = val;
|
m_Elements[m_UsedSize++] = val;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pop()
|
void pop()
|
||||||
{
|
{
|
||||||
--m_UsedSize;
|
--m_UsedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void popall()
|
||||||
|
{
|
||||||
|
m_UsedSize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
T &front()
|
T &front()
|
||||||
{
|
{
|
||||||
return m_Elements[m_UsedSize - 1];
|
return m_Elements[m_UsedSize - 1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user