summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/var.h
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/cpp/var.h')
-rw-r--r--ppapi/cpp/var.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/ppapi/cpp/var.h b/ppapi/cpp/var.h
index 437eed9..d114054 100644
--- a/ppapi/cpp/var.h
+++ b/ppapi/cpp/var.h
@@ -55,11 +55,14 @@ class Var {
///
/// You will not normally need to use this constructor because
/// the reference count will not normally be incremented for you.
- Var(PassRef, PP_Var var) {
+ Var(PassRef, const PP_Var& var) {
var_ = var;
is_managed_ = true;
}
+ /// A constructor that increments the reference count.
+ explicit Var(const PP_Var& var);
+
struct DontManage {};
// TODO(brettw): remove DontManage when this bug is fixed
@@ -70,7 +73,7 @@ class Var {
/// increased or decreased by this class instance.
///
/// @param[in] var A <code>Var</code>.
- Var(DontManage, PP_Var var) {
+ Var(DontManage, const PP_Var& var) {
var_ = var;
is_managed_ = false;
}