summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2009-06-07 01:34:01 +0200
committerAlbert Astals Cid <aacid@kde.org>2009-06-07 01:34:53 +0200
commitd09478fcc44b5c594f1803fc24654af5e10fa129 (patch)
tree9d92721233de4ce0dd19b60d5de2f2f5b70f7576
parent2083264e8ab0fd9976294de08a18de615d5a1168 (diff)
Move index and pop to class definition too
-rw-r--r--poppler/Function.cc32
1 files changed, 15 insertions, 17 deletions
diff --git a/poppler/Function.cc b/poppler/Function.cc
index 071d0521..b538f5f5 100644
--- a/poppler/Function.cc
+++ b/poppler/Function.cc
@@ -922,8 +922,21 @@ public:
(stack[sp+1].type == psInt || stack[sp+1].type == psReal); }
void copy(int n);
void roll(int n, int j);
- void index(int i);
- void pop();
+ void index(int i)
+ {
+ if (!checkOverflow()) {
+ return;
+ }
+ --sp;
+ stack[sp] = stack[sp + 1 + i];
+ }
+ void pop()
+ {
+ if (!checkUnderflow()) {
+ return;
+ }
+ ++sp;
+ }
private:
@@ -996,21 +1009,6 @@ void PSStack::roll(int n, int j) {
}
}
-void PSStack::index(int i) {
- if (!checkOverflow()) {
- return;
- }
- --sp;
- stack[sp] = stack[sp + 1 + i];
-}
-
-void PSStack::pop() {
- if (!checkUnderflow()) {
- return;
- }
- ++sp;
-}
-
PostScriptFunction::PostScriptFunction(Object *funcObj, Dict *dict) {
Stream *str;
int codePtr;