forked from nique_372/TSNStd
47 lines
1.8 KiB
MQL5
47 lines
1.8 KiB
MQL5
//+------------------------------------------------------------------+
| |
//| Def.mqh |
| |
//| Copyright 2026, Niquel Mendoza |
| |
//| https://www.mql5.com |
| |
//+------------------------------------------------------------------+
| |
#property copyright "Copyright 2026, Niquel Mendoza"
| |
#property link "https://www.mql5.com"
| |
#property strict
| |
| |
#ifndef TSNSTD_SRC_BITBUFFER_DEF_MQH
| |
#define TSNSTD_SRC_BITBUFFER_DEF_MQH
| |
| |
//+------------------------------------------------------------------+
| |
//| |
| |
//+------------------------------------------------------------------+
| |
#include <TSN\\BInt\\NUtils.mqh>
| |
| |
//+------------------------------------------------------------------+
| |
//| |
| |
//+------------------------------------------------------------------+
| |
//---
| |
// funcion princiapl que cheka m_w
| |
// aparte de que cheka la reserva si se requiere aumentar o no
| |
#define MQLARTICLES_KEYBYTES_CHECK_RES(TO_RESERVE) \
| |
if(m_w >= 64) \
| |
{ \
| |
m_s++; \
| |
m_w = 0; \
| |
if(m_s+(TO_RESERVE)>=m_r) \
| |
{ \
| |
m_r+=((TO_RESERVE)<<1) + 1; \
| |
ArrayResize(m_bits,m_r,m_r); \
| |
} \
| |
m_bits[m_s]=0ULL; \
| |
} \
| |
else if(m_s+(TO_RESERVE)>=m_r) \
| |
{ \
| |
m_r+=((TO_RESERVE)<<1) + 1; \
| |
ArrayResize(m_bits,m_r,m_r); \
| |
}
| |
| |
| |
//---
| |
// conviertes bytes a bits
| |
#define MQLARTICLES_BITBUFFER_BITS_SIZE(V) (sizeof(v)<<3)
| |
//+------------------------------------------------------------------+
| |
#endif // TSNSTD_SRC_BITBUFFER_DEF_MQH
|