diff options
author | David Robillard <d@drobilla.net> | 2011-04-28 04:45:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-28 04:45:59 +0000 |
commit | 86e095df809f8d15b54ee62801f3deb829adfae9 (patch) | |
tree | a514dd90d72621c315d78ecda973ee7500989d85 /sord | |
parent | 688537cf5ccb709c23359eb855946bedd5b65fcf (diff) | |
download | sord-86e095df809f8d15b54ee62801f3deb829adfae9.tar.gz sord-86e095df809f8d15b54ee62801f3deb829adfae9.tar.bz2 sord-86e095df809f8d15b54ee62801f3deb829adfae9.zip |
Const-correct node API.
git-svn-id: http://svn.drobilla.net/sord/trunk@98 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'sord')
-rw-r--r-- | sord/sord.h | 4 | ||||
-rw-r--r-- | sord/sordmm.hpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sord/sord.h b/sord/sord.h index 587456b..8d31085 100644 --- a/sord/sord.h +++ b/sord/sord.h @@ -91,7 +91,7 @@ typedef struct SordNodeImpl SordNode; Nodes are ordered (S P O G). The ID of the default graph is 0. */ -typedef SordNode* SordQuad[4]; +typedef const SordNode* SordQuad[4]; /** Index into a SordQuad. @@ -220,7 +220,7 @@ sord_new_literal_counted(SordWorld* world, */ SORD_API SordNode* -sord_node_copy(SordNode* node); +sord_node_copy(const SordNode* node); /** Free a node (i.e. drop a reference). diff --git a/sord/sordmm.hpp b/sord/sordmm.hpp index 294f38f..dc80cb3 100644 --- a/sord/sordmm.hpp +++ b/sord/sordmm.hpp @@ -149,7 +149,7 @@ public: inline Node(World& world, Type t, const std::string& s); inline Node(World& world); - inline Node(World& world, SordNode* node); + inline Node(World& world, const SordNode* node); inline Node(const Node& other); inline ~Node(); @@ -269,7 +269,7 @@ Node::Node(World& world) } inline -Node::Node(World& world, SordNode* node) +Node::Node(World& world, const SordNode* node) : _world(&world) { _c_obj = node ? sord_node_copy(node) : NULL; |