Skip to content

Commit

Permalink
xrQSlim: added to linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Jun 19, 2018
1 parent dac3979 commit e56f2e8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
add_subdirectory(xrLCUtil)
add_subdirectory(xrQSlim)
7 changes: 0 additions & 7 deletions src/utils/xrQSlim/src/MxBlock.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#ifndef MXBLOCK_INCLUDED // -*- C++ -*-
#define MXBLOCK_INCLUDED
#if !defined(__GNUC__)
#pragma once
#endif

/************************************************************************
Expand Down Expand Up @@ -124,6 +120,3 @@ class MxBlock
iterator end() { return begin() + size(); }
const_iterator end() const { return begin() + size(); }
};

// MXBLOCK_INCLUDED
#endif
9 changes: 2 additions & 7 deletions src/utils/xrQSlim/src/MxDynBlock.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#ifndef MXDYNBLOCK_INCLUDED // -*- C++ -*-
#define MXDYNBLOCK_INCLUDED
#if !defined(__GNUC__)
#pragma once
#endif

/************************************************************************
Expand Down Expand Up @@ -50,7 +46,9 @@ class MxDynBlock : public MxBlock<T>
T& drop() { return (*this)[--fill]; }
void drop(int d) { fill -= d; }
void remove(int i) { (*this)[i] = (*this)[--fill]; }
#if defined(WINDOWS) // Не буду удалять потому как не понимаю как оно собирается на винде
void remove_inorder(int i) { Memory.mem_move(&(*this)[i], &(*this)[i + 1], (--fill - i) * sizeof(T)); }
#endif
// Restricted STL-like interface for interoperability with
// STL-based code. Overrides select MxBlock<> definitions and
// introduces some additional std::vector-like methods.
Expand Down Expand Up @@ -80,6 +78,3 @@ inline bool varray_find(const MxDynBlock<T>& A, const T& t, unsigned int* index
}
return false;
}

// MXDYNBLOCK_INCLUDED
#endif
2 changes: 0 additions & 2 deletions src/xrCore/xrMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ class XRCORE_API xrMemory

extern XRCORE_API xrMemory Memory;

#if defined(WINDOWS)
#undef ZeroMemory
#undef CopyMemory
#undef FillMemory
#define ZeroMemory(a, b) memset(a, 0, b)
#define CopyMemory(a, b, c) memcpy(a, b, c)
#define FillMemory(a, b, c) memset(a, c, b)
#endif

/*
Начиная со стандарта C++11 нет необходимости объявлять все формы операторов new и delete.
Expand Down

0 comments on commit e56f2e8

Please sign in to comment.