Merge pull request #62 from MrSmith33/master

Fix appending string to dchar[]. Fix C-style arrays.
This commit is contained in:
Vadim Lopatin 2015-02-17 09:33:14 +03:00
commit 90429a84fd
4 changed files with 10 additions and 10 deletions

View File

@ -279,9 +279,9 @@ class Action {
} }
dstring accel = acceleratorText; dstring accel = acceleratorText;
if (accel.length > 0) { if (accel.length > 0) {
buf ~= " ("; buf ~= " ("d;
buf ~= accel; buf ~= accel;
buf ~= ")"; buf ~= ")"d;
} }
return cast(dstring)buf; return cast(dstring)buf;
} }

View File

@ -53,10 +53,10 @@ uint blendARGB(uint dst, uint src, uint alpha) {
return (r << 16) | (g << 8) | b; return (r << 16) | (g << 8) | b;
} }
//immutable int COMPONENT_OFFSET_BGR[3] = [2, 1, 0]; //immutable int[3] COMPONENT_OFFSET_BGR = [2, 1, 0];
immutable int COMPONENT_OFFSET_BGR[3] = [2, 1, 0]; immutable int[3] COMPONENT_OFFSET_BGR = [2, 1, 0];
//immutable int COMPONENT_OFFSET_BGR[3] = [1, 2, 0]; //immutable int[3] COMPONENT_OFFSET_BGR = [1, 2, 0];
immutable int COMPONENT_OFFSET_RGB[3] = [0, 1, 2]; immutable int[3] COMPONENT_OFFSET_RGB = [0, 1, 2];
immutable int COMPONENT_OFFSET_ALPHA = 3; immutable int COMPONENT_OFFSET_ALPHA = 3;
int subpixelComponentIndex(int x0, SubpixelRenderingMode mode) { int subpixelComponentIndex(int x0, SubpixelRenderingMode mode) {
switch (mode) { switch (mode) {

View File

@ -738,7 +738,7 @@ struct glyph_gamma_table(int maxv = 65)
return _map[src]; return _map[src];
} }
private: private:
ubyte _map[maxv]; ubyte[maxv] _map;
double _gamma = 1.0; double _gamma = 1.0;
}; };

View File

@ -100,9 +100,9 @@ struct lcd_distribution_lut(int maxv = 65)
} }
private: private:
ubyte m_primary[maxv]; ubyte[maxv] m_primary;
ubyte m_secondary[maxv]; ubyte[maxv] m_secondary;
ubyte m_tertiary[maxv]; ubyte[maxv] m_tertiary;
}; };
private __gshared lcd_distribution_lut!65 lut; private __gshared lcd_distribution_lut!65 lut;