| 907 | } |
| 908 | |
| 909 | int Compare(const TThis& bitmap) const { |
| 910 | size_t size = Min(Mask.GetChunkCapacity(), bitmap.Mask.GetChunkCapacity()); |
| 911 | int res = ::memcmp(Mask.Data, bitmap.Mask.Data, size * sizeof(TChunk)); |
| 912 | if (0 != res || Mask.GetChunkCapacity() == bitmap.Mask.GetChunkCapacity()) { |
| 913 | return res; |
| 914 | } |
| 915 | |
| 916 | if (Mask.GetChunkCapacity() > bitmap.Mask.GetChunkCapacity()) { |
| 917 | for (size_t i = bitmap.Mask.GetChunkCapacity(); i < Mask.GetChunkCapacity(); ++i) { |
| 918 | if (0 != Mask.Data[i]) { |
| 919 | return 1; |
| 920 | } |
| 921 | } |
| 922 | } else { |
| 923 | for (size_t i = Mask.GetChunkCapacity(); i < bitmap.Mask.GetChunkCapacity(); ++i) { |
| 924 | if (0 != bitmap.Mask.Data[i]) { |
| 925 | return -1; |
| 926 | } |
| 927 | } |
| 928 | } |
| 929 | return 0; |
| 930 | } |
| 931 | |
| 932 | template <class T> |
| 933 | Y_FORCE_INLINE int Compare(const TBitMapOps<T>& bitmap) const { |
nothing calls this directly
no test coverage detected