]> granicus.if.org Git - graphviz/commitdiff
lib/vpsc: rename bcopy->b_copy
authorHenrik Grimler <henrik@grimler.se>
Sat, 28 Mar 2020 14:43:57 +0000 (15:43 +0100)
committerHenrik Grimler <henrik@grimler.se>
Sat, 28 Mar 2020 15:47:01 +0000 (16:47 +0100)
bcopy is the name of a deprecated function. Compiling on a system
system that still have the function (for example android) gives an
error like:

```
[...]
Making all in vpsc
make[3]: Entering directory '/data/data/com.termux/files/home/projects/graphviz/build/lib/vpsc'
  CXX      blocks.lo
../../../lib/vpsc/blocks.cpp:158:36: error: too few arguments provided to function-like macro invocation
        vector<Block*> bcopy(begin(),end());
                                          ^
/data/data/com.termux/files/usr/include/strings.h:61:9: note: macro 'bcopy' defined here
        ^
1 error generated.
```

Not using bcopy for vector names in block.cpp fixes this.

lib/vpsc/blocks.cpp

index 7e25ae45c771514d887201e522dcb0a34963ed9e..ee88eb4aec859120ec0c22e27be7e4eb863de51a 100644 (file)
@@ -155,8 +155,8 @@ void Blocks::removeBlock(Block *doomed) {
        //erase(doomed);
 }
 void Blocks::cleanup() {
-       vector<Block*> bcopy(begin(),end());
-       for(vector<Block*>::iterator i=bcopy.begin();i!=bcopy.end();i++) {
+       vector<Block*> b_copy(begin(),end());
+       for(vector<Block*>::iterator i=b_copy.begin();i!=b_copy.end();i++) {
                Block *b=*i;
                if(b->deleted) {
                        erase(b);