Ver código fonte

misc: add a test .ycm_extra_conf.py file for YouCompleteMe.

undefined
Sam Hocevar 10 anos atrás
pai
commit
192e8f89ad
6 arquivos alterados com 46 adições e 2 exclusões
  1. +1
    -0
      .gitignore
  2. +33
    -0
      .ycm_extra_conf.py
  3. +4
    -1
      src/lol/image/image.h
  4. +3
    -0
      src/lol/math/half.h
  5. +2
    -0
      src/lol/math/real.h
  6. +3
    -1
      src/lol/math/vector.h

+ 1
- 0
.gitignore Ver arquivo

@@ -50,6 +50,7 @@ perf.data*
# Editor cruft
.*.swp
*~
.ycm_extra_conf.pyc
# Visual Studio cruft
*.vcxproj.user
*.csproj.user


+ 33
- 0
.ycm_extra_conf.py Ver arquivo

@@ -0,0 +1,33 @@
import os
import ycm_core

flags = [
'-xc++',
'-std=c++11',
# Engine includes
'-I.',
'-I..',
'-Isrc',
# System includes
'-I/usr/include/SDL2',
'-I/usr/include/GL',
'-I/usr/include/libdrm',
'-I/usr/include/libpng15',
# Macros
'-DHAVE_CONFIG_H',
'-D_REENTRANT',
]

def FlagsForFile(filename, **kwargs):

extension = os.path.splitext(filename)[1]
if extension not in [ 'cpp', 'h' ]:
return None

final_flags = flags

return {
'flags': final_flags,
'do_cache': True
}


+ 4
- 1
src/lol/image/image.h Ver arquivo

@@ -84,10 +84,12 @@ public:
WrapMode GetWrapY() const;
void SetWrap(WrapMode wrap_x, WrapMode wrap_y);

/* Lock continuous arrays of pixels for writing */
template<PixelFormat T> typename PixelType<T>::type *Lock();
void *Lock();
void Unlock(void const *pixels);

/* Lock 2D arrays of pixels for writing */
template<PixelFormat T>
inline array2d<typename PixelType<T>::type> &Lock2D()
{
@@ -96,8 +98,9 @@ public:
}

template<typename T>
void Unlock2D(array2d<T> const &);
void Unlock2D(array2d<T> const &);

/* XXX: this does not belong here */
bool RetrieveTiles(array<ivec2, ivec2>& tiles) const;

/* Image processing kernels */


+ 3
- 0
src/lol/math/half.h Ver arquivo

@@ -15,6 +15,9 @@
// --------------
//

#include <lol/base/types.h>

#include <cmath>
#include <cstdio>
#include <stdint.h>



+ 2
- 0
src/lol/math/real.h Ver arquivo

@@ -15,6 +15,8 @@
// --------------
//

#include <lol/base/types.h>

#include <stdint.h>

namespace lol


+ 3
- 1
src/lol/math/vector.h Ver arquivo

@@ -15,6 +15,8 @@
// ------------------
//

#include <lol/base/assert.h>
#include <lol/math/functions.h>
#include <lol/math/half.h>
#include <lol/math/real.h>
#include <lol/math/ops.h>
@@ -199,7 +201,7 @@ private:
} \
\
void printf() const; \
String tostring() const;
class String tostring() const;

/*
* 2-element vectors


Carregando…
Cancelar
Salvar