(61d00a474) v0.9.7.1
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "common/indent.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace libwebm {
|
||||
|
||||
Indent::Indent(int indent) : indent_(indent), indent_str_() { Update(); }
|
||||
|
||||
void Indent::Adjust(int indent) {
|
||||
indent_ += indent;
|
||||
if (indent_ < 0)
|
||||
indent_ = 0;
|
||||
|
||||
Update();
|
||||
}
|
||||
|
||||
void Indent::Update() { indent_str_ = std::string(indent_, ' '); }
|
||||
|
||||
} // namespace libwebm
|
||||
Reference in New Issue
Block a user