summaryrefslogtreecommitdiffstats
path: root/src/dom
diff options
context:
space:
mode:
authorArcadie M. Cracan <acracan@gmail.com>2009-12-27 11:31:36 +0000
committerArcadie M. Cracan <acracan@gmail.com>2009-12-27 11:31:36 +0000
commit30eaa4a74569f4fc5ee802ee3883201379c18235 (patch)
treeaf9d0af2df52735f67a9f4af1a821f6d2fe2f242 /src/dom
parentConnector tool: make connectors avoid the convex hull of shapes. (diff)
parentWarning cleanup (diff)
downloadinkscape-30eaa4a74569f4fc5ee802ee3883201379c18235.tar.gz
inkscape-30eaa4a74569f4fc5ee802ee3883201379c18235.zip
Connector tool: make connectors avoid the convex hull of shapes.
(bzr r8857.1.2)
Diffstat (limited to 'src/dom')
-rw-r--r--src/dom/ucd.cpp9
-rw-r--r--src/dom/util/ziptool.cpp1
2 files changed, 6 insertions, 4 deletions
diff --git a/src/dom/ucd.cpp b/src/dom/ucd.cpp
index 3747334d2..f9c36ad19 100644
--- a/src/dom/ucd.cpp
+++ b/src/dom/ucd.cpp
@@ -2514,11 +2514,12 @@ int uni_to_title(int ch)
int uni_block(int ch)
{
- int ret;
- UcdBlockData *entry;
- for (entry = ucd_blocks, ret=0 ; entry->name ; entry++, ret++)
- if (ch >= entry->low && ch <= entry->high)
+ int ret = 0;
+ for (UcdBlockData *entry = ucd_blocks; entry->name ; entry++, ret++) {
+ if ((ch >= entry->low) && (ch <= entry->high)) {
return ret;
+ }
+ }
return UCD_BLOCK_NO_BLOCK;
}
diff --git a/src/dom/util/ziptool.cpp b/src/dom/util/ziptool.cpp
index 40f456bd6..1e915ab0a 100644
--- a/src/dom/util/ziptool.cpp
+++ b/src/dom/util/ziptool.cpp
@@ -2207,6 +2207,7 @@ ZipEntry *ZipFile::addFile(const std::string &fileName,
ZipEntry *ze = new ZipEntry();
if (!ze->readFile(fileName, comment))
{
+ delete ze;
return NULL;
}
entries.push_back(ze);