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

Function msMoveStyleUp

classobject.c:44–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 * Move the style up inside the array of styles.
43 */
44int msMoveStyleUp(classObj *class, int nStyleIndex)
45{
46 styleObj *psTmpStyle = NULL;
47 if (class && nStyleIndex < class->numstyles && nStyleIndex >0)
48 {
49 psTmpStyle = (styleObj *)malloc(sizeof(styleObj));
50 initStyle(psTmpStyle);
51
52 msCopyStyle(psTmpStyle, class->styles[nStyleIndex]);
53
54 msCopyStyle(class->styles[nStyleIndex],
55 class->styles[nStyleIndex-1]);
56
57 msCopyStyle(class->styles[nStyleIndex-1], psTmpStyle);
58
59 return(MS_SUCCESS);
60 }
61 msSetError(MS_CHILDERR, "Invalid index: %d", "msMoveStyleUp()",
62 nStyleIndex);
63 return (MS_FAILURE);
64}
65
66
67/**

Callers 1

classObj_moveStyleUpFunction · 0.85

Calls 3

initStyleFunction · 0.85
msCopyStyleFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected