Skip to content

Commit

Permalink
Merge pull request #1 from cschreib/v1.2
Browse files Browse the repository at this point in the history
Merge v1.2
  • Loading branch information
cschreib authored May 5, 2017
2 parents fe63104 + 249a1a8 commit bf586e7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions gui/impl/gui/gl/src/gui_gl_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ font::font(const std::string& sFontFile, uint uiSize) : bKerning_(false)
iMaxBearingY = mFace->glyph->metrics.horiBearingY;

int iCharWidth = std::max(
mFace->glyph->bitmap.width + int(mFace->glyph->metrics.horiBearingX >> 6),
int(mFace->glyph->bitmap.width) + int(mFace->glyph->metrics.horiBearingX >> 6),
int(mFace->glyph->advance.x >> 6)
);

Expand Down Expand Up @@ -133,8 +133,8 @@ font::font(const std::string& sFontFile, uint uiSize) : bKerning_(false)
{
int iYBearing = iMaxBearingY - (mFace->glyph->metrics.horiBearingY >> 6);

for (int j = 0; j < mFace->glyph->bitmap.rows; ++j)
for (int i = 0; i < mFace->glyph->bitmap.width; ++i, ++sBuffer)
for (int j = 0; j < int(mFace->glyph->bitmap.rows); ++j)
for (int i = 0; i < int(mFace->glyph->bitmap.width); ++i, ++sBuffer)
pTexture_->set_pixel(x + i + uiXBearing, y + j + iYBearing, ub32color(255, 255, 255, *sBuffer));
}

Expand Down
2 changes: 1 addition & 1 deletion gui/src/gui_slider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ void slider::set_max_value(float fMax)
if (fMax != fMaxValue_)
{
fMaxValue_ = fMax;
if (fMaxValue_ < fMaxValue_) fMaxValue_ = fMinValue_;
if (fMaxValue_ < fMinValue_) fMaxValue_ = fMinValue_;
else step_value(fMaxValue_, fValueStep_);

if (fValue_ > fMaxValue_)
Expand Down
2 changes: 1 addition & 1 deletion gui/src/gui_statusbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void status_bar::set_max_value(float fMax)
if (fMax != fMaxValue_)
{
fMaxValue_ = fMax;
if (fMaxValue_ < fMaxValue_) fMaxValue_ = fMinValue_;
if (fMaxValue_ < fMinValue_) fMaxValue_ = fMinValue_;
fValue_ = fValue_ > fMaxValue_ ? fMaxValue_ : (fValue_ < fMinValue_ ? fMinValue_ : fValue_);
fire_update_bar_texture_();
}
Expand Down
3 changes: 2 additions & 1 deletion gui/src/gui_uiobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ bool uiobject::is_visible() const

void uiobject::set_abs_dimensions(uint uiAbsWidth, uint uiAbsHeight)
{
if (uiAbsWidth_ != uiAbsWidth || !bIsWidthAbs_ || uiAbsHeight_ != uiAbsHeight || !bIsWidthAbs_)
if (uiAbsWidth_ != uiAbsWidth || !bIsWidthAbs_ ||
uiAbsHeight_ != uiAbsHeight || !bIsHeightAbs_)
{
pManager_->notify_object_moved();
bIsWidthAbs_ = true;
Expand Down
1 change: 0 additions & 1 deletion luapp/src/luapp_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,6 @@ std::string state::get_type_name(type mType)
void state::get_global(const std::string& sName)
{
std::deque<std::string> lDecomposedName;
std::string sVarName;
utils::string_vector lWords = utils::cut(sName, ":");
utils::string_vector::iterator iter1;
foreach (iter1, lWords)
Expand Down

0 comments on commit bf586e7

Please sign in to comment.