X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Futil.h;h=4fa5a08982b3e624df20d39080b9726887b060f2;hb=6b8de05d0a6696dff4b7dccec5b74889f3cdc486;hp=a2e1419835d39036f5d2ccf5b857728b96529bca;hpb=01a196e08db49d83cf6c5abd8a799c56dcfef503;p=novacoin.git diff --git a/src/util.h b/src/util.h index a2e1419..4fa5a08 100644 --- a/src/util.h +++ b/src/util.h @@ -179,7 +179,7 @@ void AddTimeData(const CNetAddr& ip, int64 nTime); -// Wrapper to automatically initialize mutex +/** Wrapper to automatically initialize mutex. */ class CCriticalSection { protected: @@ -192,7 +192,7 @@ public: bool TryEnter(const char* pszName, const char* pszFile, int nLine); }; -// Automatically leave critical section when leaving block, needed for exception safety +/** RAII object that acquires mutex. Needed for exception safety. */ class CCriticalBlock { protected: @@ -225,6 +225,7 @@ public: #define LEAVE_CRITICAL_SECTION(cs) \ (cs).Leave() +/** RAII object that tries to acquire mutex. Needed for exception safety. */ class CTryCriticalBlock { protected: @@ -523,8 +524,9 @@ inline uint160 Hash160(const std::vector& vch) } -// Median filter over a stream of values -// Returns the median of the last N numbers +/** Median filter over a stream of values. + * Returns the median of the last N numbers + */ template class CMedianFilter { private: