Change workaround for visual assist bug with large raw strings in macros

* The bug seems to happen if two raw strings concatenated together are
  large enough, so instead we pass them as separate parameters to a
  different macro then concatenate them inside the macro.
This commit is contained in:
baldurk
2017-08-16 16:29:56 +01:00
parent 38028b1b64
commit b70e897838
6 changed files with 40 additions and 9 deletions
+3 -2
View File
@@ -192,7 +192,7 @@ As the name suggests, this is used for tracking a 'recent file' list.
)");
void AddRecentFile(QList<QString> &recentList, const QString &file, int maxItems);
DOCUMENT(R"(A persistant config file that is automatically loaded and saved, which contains any
DOCUMENT2(R"(A persistant config file that is automatically loaded and saved, which contains any
settings and information that needs to be preserved from one run to the next.
For more information about some of these settings that are user-facing see
@@ -303,7 +303,8 @@ For more information about some of these settings that are user-facing see
coloured instead of just a side-bar.
Defaults to ``True``.
)",
R"(
.. data:: Formatter_MinFigures
The minimum number of significant figures to show in formatted floating point values.
+3
View File
@@ -4,6 +4,9 @@
// use documentation for docstrings
#define DOCUMENT(text) %feature("docstring") text
#define DOCUMENT2(text1, text2) %feature("docstring") text1 text2
#define DOCUMENT3(text1, text2, text3) %feature("docstring") text1 text2 text3
#define DOCUMENT4(text1, text2, text3, text4) %feature("docstring") text1 text2 text3 text4
%begin %{
+3
View File
@@ -11,6 +11,9 @@
// use documentation for docstrings
#define DOCUMENT(text) %feature("docstring") text
#define DOCUMENT2(text1, text2) %feature("docstring") text1 text2
#define DOCUMENT3(text1, text2, text3) %feature("docstring") text1 text2 text3
#define DOCUMENT4(text1, text2, text3, text4) %feature("docstring") text1 text2 text3 text4
// ignore warning about base class rdctype::array<char> methods in rdctype::str
#pragma SWIG nowarn=401
+12
View File
@@ -36,6 +36,18 @@
#define DOCUMENT(text)
#endif
#ifndef DOCUMENT2
#define DOCUMENT2(text1, text2)
#endif
#ifndef DOCUMENT3
#define DOCUMENT3(text1, text2, text3)
#endif
#ifndef DOCUMENT4
#define DOCUMENT4(text1, text2, text3, text4)
#endif
// we provide a basic templated type that is a fixed array that just contains a pointer to the
// element
// array and a size. This could easily map to C as just void* and size but in C++ at least we can be
+16
View File
@@ -69,6 +69,22 @@ typedef uint32_t bool32;
#define DOCUMENT(text)
#endif
// There's a bug in visual assist that stops highlighting if a raw string is too long. It looks like
// it happens when it reaches 128 lines long or ~5000 bytes which is quite suspicious.
// Anyway since this doesn't come up that often, we split the following docstring in two part-way
// through. Don't be alarmed, just move along
#ifndef DOCUMENT2
#define DOCUMENT2(text1, text2)
#endif
#ifndef DOCUMENT3
#define DOCUMENT3(text1, text2, text3)
#endif
#ifndef DOCUMENT4
#define DOCUMENT4(text1, text2, text3, text4)
#endif
#if defined(RENDERDOC_PLATFORM_WIN32)
#ifdef RENDERDOC_EXPORTS
+3 -7
View File
@@ -512,11 +512,7 @@ enum class BindType : uint32_t
InputAttachment,
};
// There's a bug in visual assist that stops highlighting if a raw string is too long. It looks like
// it happens when it reaches 128 lines long which is quite suspicious.
// Anyway since this doesn't come up that often, we split the following docstring in two part-way
// through. Don't be alarmed, just move along
DOCUMENT(R"(Annotates a particular built-in input or output from a shader with a special meaning to
DOCUMENT2(R"(Annotates a particular built-in input or output from a shader with a special meaning to
the hardware or API.
Some of the built-in inputs or outputs can be declared multiple times in arrays or otherwise indexed
@@ -642,8 +638,8 @@ to apply to multiple related things - see :data:`ClipDistance`, :data:`CullDista
An input to the pixel shader that contains the location of the current sample relative to the
pixel, when running the pixel shader at sample frequency.
)"
R"(
)",
R"(
.. data:: MSAASampleIndex
An input to the pixel shader that indicates which sample in the range ``0 .. N-1`` is currently