Skip to content

Commit

Permalink
bugfix: remove remaining references to boost (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkae authored Jan 15, 2025
1 parent 21ba911 commit c525d51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ parts:
- libmircommon-internal-dev
- libmircommon-dev
- libmirserver-internal-dev
- libboost-filesystem-dev
- libfreetype6-dev
- libwayland-dev
- libxkbcommon-dev
Expand Down
11 changes: 3 additions & 8 deletions src/program_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MIR_LOG_COMPONENT "program_factory"

#include "program_factory.h"
#include <boost/throw_exception.hpp>
#include <mir/graphics/egl_error.h>
#include <mir/log.h>
#include <sstream>
Expand Down Expand Up @@ -217,7 +216,7 @@ GLuint miracle::ProgramFactory::compile_shader(GLenum type, GLchar const* src)
GLuint id = glCreateShader(type);
if (!id)
{
BOOST_THROW_EXCEPTION(mir::graphics::gl_error("Failed to create shader"));
throw std::runtime_error("Failed to create shader");
}

glShaderSource(id, 1, &src, NULL);
Expand All @@ -229,9 +228,7 @@ GLuint miracle::ProgramFactory::compile_shader(GLenum type, GLchar const* src)
GLchar log[1024] = "(No log info)";
glGetShaderInfoLog(id, sizeof log, NULL, log);
glDeleteShader(id);
BOOST_THROW_EXCEPTION(
std::runtime_error(
std::string("Compile failed: ") + log + " for:\n" + src));
throw std::runtime_error(std::string("Compile failed: ") + log + " for:\n" + src);
}
return id;
}
Expand All @@ -251,9 +248,7 @@ miracle::ProgramHandle miracle::ProgramFactory::link_shader(
GLchar log[1024];
glGetProgramInfoLog(program, sizeof log - 1, NULL, log);
log[sizeof log - 1] = '\0';
BOOST_THROW_EXCEPTION(
std::runtime_error(
std::string("Linking GL shader failed: ") + log));
throw std::runtime_error(std::string("Linking GL shader failed: ") + log);
}

return program;
Expand Down

0 comments on commit c525d51

Please sign in to comment.