Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
bcdf2992
Commit
bcdf2992
authored
Jul 15, 2012
by
Davis King
Browse files
Changed code so serialization works with the lite version of protocol buffers
as well as the normal version.
parent
4937d439
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dlib/serialize.h
dlib/serialize.h
+3
-3
No files found.
dlib/serialize.h
View file @
bcdf2992
...
@@ -1044,12 +1044,12 @@ namespace dlib
...
@@ -1044,12 +1044,12 @@ namespace dlib
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
// forward declare the Message object so we can reference it below.
// forward declare the Message
Lite
object so we can reference it below.
namespace
google
namespace
google
{
{
namespace
protobuf
namespace
protobuf
{
{
class
Message
;
class
Message
Lite
;
}
}
}
}
...
@@ -1067,7 +1067,7 @@ namespace dlib
...
@@ -1067,7 +1067,7 @@ namespace dlib
};
};
template
<
typename
T
>
template
<
typename
T
>
struct
is_protocol_buffer
<
T
,
typename
enable_if
<
is_convertible
<
T
*
,
::
google
::
protobuf
::
Message
*>
>::
type
>
struct
is_protocol_buffer
<
T
,
typename
enable_if
<
is_convertible
<
T
*
,
::
google
::
protobuf
::
Message
Lite
*>
>::
type
>
{
{
static
const
bool
value
=
true
;
static
const
bool
value
=
true
;
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment