MCPcopy Create free account
hub / github.com/MapServer/MapServer / msMoveStyleDown

Function msMoveStyleDown

classobject.c:70–91  ·  view source on GitHub ↗

* Move the style down inside the array of styles. */

Source from the content-addressed store, hash-verified

68 * Move the style down inside the array of styles.
69 */
70int msMoveStyleDown(classObj *class, int nStyleIndex)
71{
72 styleObj *psTmpStyle = NULL;
73
74 if (class && nStyleIndex < class->numstyles-1 && nStyleIndex >=0)
75 {
76 psTmpStyle = (styleObj *)malloc(sizeof(styleObj));
77 initStyle(psTmpStyle);
78
79 msCopyStyle(psTmpStyle, class->styles[nStyleIndex]);
80
81 msCopyStyle(class->styles[nStyleIndex],
82 class->styles[nStyleIndex+1]);
83
84 msCopyStyle(class->styles[nStyleIndex+1], psTmpStyle);
85
86 return(MS_SUCCESS);
87 }
88 msSetError(MS_CHILDERR, "Invalid index: %d", "msMoveStyleDown()",
89 nStyleIndex);
90 return (MS_FAILURE);
91}
92
93/* Moved here from mapscript.i
94 *

Callers 1

classObj_moveStyleDownFunction · 0.85

Calls 3

initStyleFunction · 0.85
msCopyStyleFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected